Lines Matching defs:to
9 * This file is subject to the terms and conditions of the GNU General Public
159 * @to: frame buffer colormap structure
161 * Copy contents of colormap from @from to @to.
164 int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to)
169 if (to->start > from->start)
170 fromoff = to->start - from->start;
172 tooff = from->start - to->start;
173 size = to->len - tooff;
180 memcpy(to->red+tooff, from->red+fromoff, size);
181 memcpy(to->green+tooff, from->green+fromoff, size);
182 memcpy(to->blue+tooff, from->blue+fromoff, size);
183 if (from->transp && to->transp)
184 memcpy(to->transp+tooff, from->transp+fromoff, size);
188 int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to)
193 if (to->start > from->start)
194 fromoff = to->start - from->start;
196 tooff = from->start - to->start;
197 size = to->len - tooff;
204 if (copy_to_user(to->red+tooff, from->red+fromoff, size))
206 if (copy_to_user(to->green+tooff, from->green+fromoff, size))
208 if (copy_to_user(to->blue+tooff, from->blue+fromoff, size))
210 if (from->transp && to->transp)
211 if (copy_to_user(to->transp+tooff, from->transp+fromoff, size))
303 * Returns pointer to a frame buffer colormap structure.