From: Arnd Bergmann Date: Tue, 6 Jul 2010 21:03:55 +0000 (+0200) Subject: raw: use explicit llseek file operations X-Git-Tag: Ubuntu-5.13.0-19.19~29892^2~7 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cb3b9cf818070df1bf592b71275bcf99d8edefcb;p=mirror_ubuntu-jammy-kernel.git raw: use explicit llseek file operations The raw_fops may need to seek, so there should be an explicit reference to default_llseek. raw_ctl_fops does not contain a read or write method, so we use noop_llseek to ignore seeking requests without an error. Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/raw.c b/drivers/char/raw.c index b38942f6bf31..28c0169e34da 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c @@ -258,6 +258,7 @@ static const struct file_operations raw_fops = { .open = raw_open, .release = raw_release, .unlocked_ioctl = raw_ioctl, + .llseek = default_llseek, .owner = THIS_MODULE, }; @@ -265,6 +266,7 @@ static const struct file_operations raw_ctl_fops = { .unlocked_ioctl = raw_ctl_ioctl, .open = raw_open, .owner = THIS_MODULE, + .llseek = noop_llseek, }; static struct cdev raw_cdev;