Thomas Zimmermann <tzimmermann@xxxxxxx> writes: > Drop the default implementations for file read, write and mmap > operations. Each fbdev driver must now provide an implementation > and select any necessary helpers. If no implementation has been > set, fbdev returns an errno code to user space. The code is the > same as if the operation had not been set in the file_operations > struct. > > This change makes the fbdev helpers for I/O memory optional. Most > systems only use system-memory framebuffers via DRM's fbdev emulation. > > Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> > --- [...] > @@ -34,13 +34,13 @@ static ssize_t fb_read(struct file *file, char __user *buf, size_t count, loff_t > if (!info) > return -ENODEV; > > + if (!info->fbops->fb_read) > + return -EINVAL; > + Can we also add a warn here? In case that it was missed to set a driver callback. Probably can be figured out from the -EINVAL but better to be explicit about the issue to make finding that easier. And same for the other fops. Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat