drm/shmem: drop DEFINE_DRM_GEM_SHMEM_FOPS
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 16 Oct 2019 11:51:57 +0000 (13:51 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 17 Oct 2019 11:59:16 +0000 (13:59 +0200)
DEFINE_DRM_GEM_SHMEM_FOPS is identical
to DEFINE_DRM_GEM_FOPS now, drop it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-6-kraxel@redhat.com
drivers/gpu/drm/cirrus/cirrus.c
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/tiny/gm12u320.c
drivers/gpu/drm/v3d/v3d_drv.c
drivers/gpu/drm/virtio/virtgpu_drv.c
include/drm/drm_gem_shmem_helper.h

index 89d9e6fdeb8c5130316ef80e5529cbf2919d9620..7d08d067e1a4aa8def5a331c1c1e55302b4724df 100644 (file)
@@ -510,7 +510,7 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus)
 
 /* ------------------------------------------------------------------ */
 
-DEFINE_DRM_GEM_SHMEM_FOPS(cirrus_fops);
+DEFINE_DRM_GEM_FOPS(cirrus_fops);
 
 static struct drm_driver cirrus_driver = {
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
index bc2ddeb55f5d86ffbc9cbe1a39e2e90d77ce60df..9d086133a84ed23b216fae55bf69b1d74668dc80 100644 (file)
@@ -470,7 +470,7 @@ static const struct drm_ioctl_desc panfrost_drm_driver_ioctls[] = {
        PANFROST_IOCTL(MADVISE,         madvise,        DRM_RENDER_ALLOW),
 };
 
-DEFINE_DRM_GEM_SHMEM_FOPS(panfrost_drm_driver_fops);
+DEFINE_DRM_GEM_FOPS(panfrost_drm_driver_fops);
 
 /*
  * Panfrost driver version:
index 03d0e2df6774408c15c976ad930113d1975b4106..94fb1f59356435905186560a007e907ee9c56e89 100644 (file)
@@ -649,7 +649,7 @@ static void gm12u320_driver_release(struct drm_device *dev)
        kfree(gm12u320);
 }
 
-DEFINE_DRM_GEM_SHMEM_FOPS(gm12u320_fops);
+DEFINE_DRM_GEM_FOPS(gm12u320_fops);
 
 static struct drm_driver gm12u320_drm_driver = {
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
index e94bf75368bef387927d8f64616c00aed070dfa2..1a07462b452879077a243034e6f4618c1ca77e92 100644 (file)
@@ -172,7 +172,7 @@ v3d_postclose(struct drm_device *dev, struct drm_file *file)
        kfree(v3d_priv);
 }
 
-DEFINE_DRM_GEM_SHMEM_FOPS(v3d_drm_fops);
+DEFINE_DRM_GEM_FOPS(v3d_drm_fops);
 
 /* DRM_AUTH is required on SUBMIT_CL for now, while we don't have GMP
  * protection between clients.  Note that render nodes would be be
index a5cb58754f7d7b249dd62fe2e84101fc222fe09d..8dee698c90ffc390333fce0be9338435eeebe815 100644 (file)
@@ -184,7 +184,7 @@ MODULE_AUTHOR("Dave Airlie <airlied@redhat.com>");
 MODULE_AUTHOR("Gerd Hoffmann <kraxel@redhat.com>");
 MODULE_AUTHOR("Alon Levy");
 
-DEFINE_DRM_GEM_SHMEM_FOPS(virtio_gpu_driver_fops);
+DEFINE_DRM_GEM_FOPS(virtio_gpu_driver_fops);
 
 static struct drm_driver driver = {
        .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_RENDER | DRIVER_ATOMIC,
index d89f2116c8ab4a09472744fd4f4e7435bb89293d..6748379a0b44764092c2331d7f864e5fcb7817ff 100644 (file)
@@ -88,32 +88,6 @@ struct drm_gem_shmem_object {
 #define to_drm_gem_shmem_obj(obj) \
        container_of(obj, struct drm_gem_shmem_object, base)
 
-/**
- * DEFINE_DRM_GEM_SHMEM_FOPS() - Macro to generate file operations for shmem drivers
- * @name: name for the generated structure
- *
- * This macro autogenerates a suitable &struct file_operations for shmem based
- * drivers, which can be assigned to &drm_driver.fops. Note that this structure
- * cannot be shared between drivers, because it contains a reference to the
- * current module using THIS_MODULE.
- *
- * Note that the declaration is already marked as static - if you need a
- * non-static version of this you're probably doing it wrong and will break the
- * THIS_MODULE reference by accident.
- */
-#define DEFINE_DRM_GEM_SHMEM_FOPS(name) \
-       static const struct file_operations name = {\
-               .owner          = THIS_MODULE,\
-               .open           = drm_open,\
-               .release        = drm_release,\
-               .unlocked_ioctl = drm_ioctl,\
-               .compat_ioctl   = drm_compat_ioctl,\
-               .poll           = drm_poll,\
-               .read           = drm_read,\
-               .llseek         = noop_llseek,\
-               .mmap           = drm_gem_mmap, \
-       }
-
 struct drm_gem_shmem_object *drm_gem_shmem_create(struct drm_device *dev, size_t size);
 void drm_gem_shmem_free_object(struct drm_gem_object *obj);