Lines Matching defs:to
9 * This file is subject to the terms and conditions of the GNU General Public
145 * @to: frame buffer colormap structure
147 * Copy contents of colormap from @from to @to.
150 int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to)
155 if (to->start > from->start)
156 fromoff = to->start - from->start;
158 tooff = from->start - to->start;
159 size = to->len - tooff;
166 memcpy(to->red+tooff, from->red+fromoff, size);
167 memcpy(to->green+tooff, from->green+fromoff, size);
168 memcpy(to->blue+tooff, from->blue+fromoff, size);
169 if (from->transp && to->transp)
170 memcpy(to->transp+tooff, from->transp+fromoff, size);
174 int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to)
179 if (to->start > from->start)
180 fromoff = to->start - from->start;
182 tooff = from->start - to->start;
183 size = to->len - tooff;
190 if (copy_to_user(to->red+tooff, from->red+fromoff, size))
192 if (copy_to_user(to->green+tooff, from->green+fromoff, size))
194 if (copy_to_user(to->blue+tooff, from->blue+fromoff, size))
196 if (from->transp && to->transp)
197 if (copy_to_user(to->transp+tooff, from->transp+fromoff, size))
282 * Returns pointer to a frame buffer colormap structure.