.. | .. |
---|
74 | 74 | struct ht16k33_fbdev fbdev; |
---|
75 | 75 | }; |
---|
76 | 76 | |
---|
77 | | -static struct fb_fix_screeninfo ht16k33_fb_fix = { |
---|
| 77 | +static const struct fb_fix_screeninfo ht16k33_fb_fix = { |
---|
78 | 78 | .id = DRIVER_NAME, |
---|
79 | 79 | .type = FB_TYPE_PACKED_PIXELS, |
---|
80 | 80 | .visual = FB_VISUAL_MONO10, |
---|
.. | .. |
---|
85 | 85 | .accel = FB_ACCEL_NONE, |
---|
86 | 86 | }; |
---|
87 | 87 | |
---|
88 | | -static struct fb_var_screeninfo ht16k33_fb_var = { |
---|
| 88 | +static const struct fb_var_screeninfo ht16k33_fb_var = { |
---|
89 | 89 | .xres = HT16K33_MATRIX_LED_MAX_ROWS, |
---|
90 | 90 | .yres = HT16K33_MATRIX_LED_MAX_COLS, |
---|
91 | 91 | .xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS, |
---|
.. | .. |
---|
231 | 231 | static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma) |
---|
232 | 232 | { |
---|
233 | 233 | struct ht16k33_priv *priv = info->par; |
---|
| 234 | + struct page *pages = virt_to_page(priv->fbdev.buffer); |
---|
234 | 235 | |
---|
235 | | - return vm_insert_page(vma, vma->vm_start, |
---|
236 | | - virt_to_page(priv->fbdev.buffer)); |
---|
| 236 | + return vm_map_pages_zero(vma, &pages, 1); |
---|
237 | 237 | } |
---|
238 | 238 | |
---|
239 | | -static struct fb_ops ht16k33_fb_ops = { |
---|
| 239 | +static const struct fb_ops ht16k33_fb_ops = { |
---|
240 | 240 | .owner = THIS_MODULE, |
---|
241 | 241 | .fb_read = fb_sys_read, |
---|
242 | 242 | .fb_write = fb_sys_write, |
---|