Lines Matching refs:to
9 * This file is subject to the terms and conditions of the GNU General Public
144 * @to: frame buffer colormap structure
146 * Copy contents of colormap from @from to @to.
149 int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to)
154 if (to->start > from->start)
155 fromoff = to->start - from->start;
157 tooff = from->start - to->start;
158 size = to->len - tooff;
165 memcpy(to->red+tooff, from->red+fromoff, size);
166 memcpy(to->green+tooff, from->green+fromoff, size);
167 memcpy(to->blue+tooff, from->blue+fromoff, size);
168 if (from->transp && to->transp)
169 memcpy(to->transp+tooff, from->transp+fromoff, size);
173 int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to)
178 if (to->start > from->start)
179 fromoff = to->start - from->start;
181 tooff = from->start - to->start;
182 size = to->len - tooff;
189 if (copy_to_user(to->red+tooff, from->red+fromoff, size))
191 if (copy_to_user(to->green+tooff, from->green+fromoff, size))
193 if (copy_to_user(to->blue+tooff, from->blue+fromoff, size))
195 if (from->transp && to->transp)
196 if (copy_to_user(to->transp+tooff, from->transp+fromoff, size))
289 * Returns pointer to a frame buffer colormap structure.