提交 dc880abe 编写于 作者: A Arnd Bergmann

drm: use noop_llseek

The drm device drivers currently allow seeking on the
character device but never care about the actual
file position.

When we change the default llseek operation to be
no_llseek, calling llseek on a drm device would
return an error condition, which is an API change.

Explicitly setting noop_llseek lets us keep the
current API.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
上级 49553c2e
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl, .compat_ioctl = i915_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -63,6 +63,7 @@ static struct drm_driver driver = { ...@@ -63,6 +63,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
......
...@@ -74,6 +74,7 @@ static struct drm_driver driver = { ...@@ -74,6 +74,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
......
...@@ -547,6 +547,7 @@ static struct drm_driver driver = { ...@@ -547,6 +547,7 @@ static struct drm_driver driver = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl, .compat_ioctl = i915_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
......
...@@ -75,6 +75,7 @@ static struct drm_driver driver = { ...@@ -75,6 +75,7 @@ static struct drm_driver driver = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = mga_compat_ioctl, .compat_ioctl = mga_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -393,6 +393,7 @@ static struct drm_driver driver = { ...@@ -393,6 +393,7 @@ static struct drm_driver driver = {
#if defined(CONFIG_COMPAT) #if defined(CONFIG_COMPAT)
.compat_ioctl = nouveau_compat_ioctl, .compat_ioctl = nouveau_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -71,6 +71,7 @@ static struct drm_driver driver = { ...@@ -71,6 +71,7 @@ static struct drm_driver driver = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = r128_compat_ioctl, .compat_ioctl = r128_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -219,6 +219,7 @@ static struct drm_driver driver_old = { ...@@ -219,6 +219,7 @@ static struct drm_driver driver_old = {
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
.compat_ioctl = radeon_compat_ioctl, .compat_ioctl = radeon_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
......
...@@ -54,6 +54,7 @@ static struct drm_driver driver = { ...@@ -54,6 +54,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
......
...@@ -83,6 +83,7 @@ static struct drm_driver driver = { ...@@ -83,6 +83,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -52,6 +52,7 @@ static struct drm_driver driver = { ...@@ -52,6 +52,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -62,6 +62,7 @@ static struct drm_driver driver = { ...@@ -62,6 +62,7 @@ static struct drm_driver driver = {
.mmap = drm_mmap, .mmap = drm_mmap,
.poll = drm_poll, .poll = drm_poll,
.fasync = drm_fasync, .fasync = drm_fasync,
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
......
...@@ -745,6 +745,7 @@ static struct drm_driver driver = { ...@@ -745,6 +745,7 @@ static struct drm_driver driver = {
#if defined(CONFIG_COMPAT) #if defined(CONFIG_COMPAT)
.compat_ioctl = drm_compat_ioctl, .compat_ioctl = drm_compat_ioctl,
#endif #endif
.llseek = noop_llseek,
}, },
.pci_driver = { .pci_driver = {
.name = VMWGFX_DRIVER_NAME, .name = VMWGFX_DRIVER_NAME,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册