Skip to content

Commit

Permalink
drm/<drivers>: Constify struct drm_driver
Browse files Browse the repository at this point in the history
Only the following drivers aren't converted:
- amdgpu, because of the driver_feature mangling due to virt support.
  Subsequent patch will address this.
- nouveau, because DRIVER_ATOMIC uapi is still not the default on the
  platforms where it's supported (i.e. again driver_feature mangling)
- vc4, again because of driver_feature mangling
- qxl, because the ioctl table is somewhere else and moving that is
  maybe a bit too much, hence the num_ioctls assignment prevents a
  const driver structure.
- arcpgu, because that is stuck behind a pending tiny-fication series
  from me.
- legacy drivers, because legacy requires non-const drm_driver.

Note that for armada I also went ahead and made the ioctl array const.

Only cc'ing the driver people who've not been converted (everyone else
is way too much).

v2: Fix one misplaced const static, should be static const (0day)

v3:
- Improve commit message (Sam)

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: kernel test robot <lkp@intel.com>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201104100425.1922351-5-daniel.vetter@ffwll.ch
  • Loading branch information
Daniel Vetter committed Nov 6, 2020
1 parent 8f5c7aa commit 70a59dd
Show file tree
Hide file tree
Showing 63 changed files with 75 additions and 78 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/arm/display/komeda/komeda_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static irqreturn_t komeda_kms_irq_handler(int irq, void *data)
return status;
}

static struct drm_driver komeda_kms_driver = {
static const struct drm_driver komeda_kms_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.lastclose = drm_fb_helper_lastclose,
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(komeda_gem_cma_dumb_create),
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/arm/hdlcd_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void hdlcd_debugfs_init(struct drm_minor *minor)

DEFINE_DRM_GEM_CMA_FOPS(fops);

static struct drm_driver hdlcd_driver = {
static const struct drm_driver hdlcd_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.irq_handler = hdlcd_irq,
.irq_preinstall = hdlcd_irq_preinstall,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/arm/malidp_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static void malidp_debugfs_init(struct drm_minor *minor)

#endif //CONFIG_DEBUG_FS

static struct drm_driver malidp_driver = {
static const struct drm_driver malidp_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(malidp_dumb_create),
#ifdef CONFIG_DEBUG_FS
Expand Down
7 changes: 3 additions & 4 deletions drivers/gpu/drm/armada/armada_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
#include <drm/armada_drm.h>
#include "armada_ioctlP.h"

static struct drm_ioctl_desc armada_ioctls[] = {
static const struct drm_ioctl_desc armada_ioctls[] = {
DRM_IOCTL_DEF_DRV(ARMADA_GEM_CREATE, armada_gem_create_ioctl,0),
DRM_IOCTL_DEF_DRV(ARMADA_GEM_MMAP, armada_gem_mmap_ioctl, 0),
DRM_IOCTL_DEF_DRV(ARMADA_GEM_PWRITE, armada_gem_pwrite_ioctl, 0),
};

DEFINE_DRM_GEM_FOPS(armada_drm_fops);

static struct drm_driver armada_drm_driver = {
static const struct drm_driver armada_drm_driver = {
.lastclose = drm_fb_helper_lastclose,
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
Expand All @@ -48,6 +48,7 @@ static struct drm_driver armada_drm_driver = {
.date = "20120730",
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.ioctls = armada_ioctls,
.num_ioctls = ARRAY_SIZE(armada_ioctls),
.fops = &armada_drm_fops,
};

Expand Down Expand Up @@ -275,8 +276,6 @@ static int __init armada_drm_init(void)
{
int ret;

armada_drm_driver.num_ioctls = ARRAY_SIZE(armada_ioctls);

ret = platform_driver_register(&armada_lcd_platform_driver);
if (ret)
return ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void aspeed_gfx_unload(struct drm_device *drm)

DEFINE_DRM_GEM_CMA_FOPS(fops);

static struct drm_driver aspeed_gfx_driver = {
static const struct drm_driver aspeed_gfx_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
DRM_GEM_CMA_DRIVER_OPS,
.fops = &fops,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module_param_named(modeset, ast_modeset, int, 0400);

DEFINE_DRM_GEM_FOPS(ast_fops);

static struct drm_driver ast_driver = {
static const struct drm_driver ast_driver = {
.driver_features = DRIVER_ATOMIC |
DRIVER_GEM |
DRIVER_MODESET,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static inline struct ast_private *to_ast_private(struct drm_device *dev)
return container_of(dev, struct ast_private, base);
}

struct ast_private *ast_device_create(struct drm_driver *drv,
struct ast_private *ast_device_create(const struct drm_driver *drv,
struct pci_dev *pdev,
unsigned long flags);

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ast/ast_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ static void ast_device_release(void *data)
ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x04);
}

struct ast_private *ast_device_create(struct drm_driver *drv,
struct ast_private *ast_device_create(const struct drm_driver *drv,
struct pci_dev *pdev,
unsigned long flags)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ static void atmel_hlcdc_dc_irq_uninstall(struct drm_device *dev)

DEFINE_DRM_GEM_CMA_FOPS(fops);

static struct drm_driver atmel_hlcdc_dc_driver = {
static const struct drm_driver atmel_hlcdc_dc_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.irq_handler = atmel_hlcdc_dc_irq_handler,
.irq_preinstall = atmel_hlcdc_dc_irq_uninstall,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/bochs/bochs_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int bochs_load(struct drm_device *dev)

DEFINE_DRM_GEM_FOPS(bochs_fops);

static struct drm_driver bochs_driver = {
static const struct drm_driver bochs_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.fops = &bochs_fops,
.name = "bochs-drm",
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/etnaviv/etnaviv_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ static const struct file_operations fops = {
.mmap = etnaviv_gem_mmap,
};

static struct drm_driver etnaviv_drm_driver = {
static const struct drm_driver etnaviv_drm_driver = {
.driver_features = DRIVER_GEM | DRIVER_RENDER,
.open = etnaviv_open,
.postclose = etnaviv_postclose,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/exynos/exynos_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static const struct file_operations exynos_drm_driver_fops = {
.release = drm_release,
};

static struct drm_driver exynos_drm_driver = {
static const struct drm_driver exynos_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM
| DRIVER_ATOMIC | DRIVER_RENDER,
.open = exynos_drm_open,
Expand Down
5 changes: 2 additions & 3 deletions drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static irqreturn_t fsl_dcu_drm_irq(int irq, void *arg)

DEFINE_DRM_GEM_CMA_FOPS(fsl_dcu_drm_fops);

static struct drm_driver fsl_dcu_drm_driver = {
static const struct drm_driver fsl_dcu_drm_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.load = fsl_dcu_load,
.unload = fsl_dcu_unload,
Expand Down Expand Up @@ -234,7 +234,6 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct resource *res;
void __iomem *base;
struct drm_driver *driver = &fsl_dcu_drm_driver;
struct clk *pix_clk_in;
char pix_clk_name[32];
const char *pix_clk_in_name;
Expand Down Expand Up @@ -304,7 +303,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev)

fsl_dev->tcon = fsl_tcon_init(dev);

drm = drm_dev_alloc(driver, dev);
drm = drm_dev_alloc(&fsl_dcu_drm_driver, dev);
if (IS_ERR(drm)) {
ret = PTR_ERR(drm);
goto unregister_pix_clk;
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/gma500/psb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "psb_intel_reg.h"
#include "psb_reg.h"

static struct drm_driver driver;
static const struct drm_driver driver;
static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);

/*
Expand Down Expand Up @@ -491,7 +491,7 @@ static const struct file_operations psb_gem_fops = {
.read = drm_read,
};

static struct drm_driver driver = {
static const struct drm_driver driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM,
.lastclose = drm_fb_helper_lastclose,

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
return IRQ_HANDLED;
}

static struct drm_driver hibmc_driver = {
static const struct drm_driver hibmc_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.fops = &hibmc_fops,
.name = "hibmc",
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ static const struct drm_mode_config_funcs ade_mode_config_funcs = {

DEFINE_DRM_GEM_CMA_FOPS(ade_fops);

static struct drm_driver ade_driver = {
static const struct drm_driver ade_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.fops = &ade_fops,
DRM_GEM_CMA_DRIVER_OPS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct kirin_drm_data {
u32 num_planes;
u32 prim_plane;

struct drm_driver *driver;
const struct drm_driver *driver;
const struct drm_crtc_helper_funcs *crtc_helper_funcs;
const struct drm_crtc_funcs *crtc_funcs;
const struct drm_plane_helper_funcs *plane_helper_funcs;
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#include "intel_pm.h"
#include "vlv_suspend.h"

static struct drm_driver driver;
static const struct drm_driver driver;

static int i915_get_bridge_dev(struct drm_i915_private *dev_priv)
{
Expand Down Expand Up @@ -1737,7 +1737,7 @@ static const struct drm_ioctl_desc i915_ioctls[] = {
DRM_IOCTL_DEF_DRV(I915_GEM_VM_DESTROY, i915_gem_vm_destroy_ioctl, DRM_RENDER_ALLOW),
};

static struct drm_driver driver = {
static const struct drm_driver driver = {
/* Don't use MTRRs here; the Xserver or userspace app should
* deal with them for Intel hardware.
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/selftests/mock_gem_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void mock_device_release(struct drm_device *dev)
i915_params_free(&i915->params);
}

static struct drm_driver mock_driver = {
static const struct drm_driver mock_driver = {
.name = "mock",
.driver_features = DRIVER_GEM,
.release = mock_device_release,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/imx/dcss/dcss-kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static const struct drm_mode_config_funcs dcss_drm_mode_config_funcs = {
.atomic_commit = drm_atomic_helper_commit,
};

static struct drm_driver dcss_kms_driver = {
static const struct drm_driver dcss_kms_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
DRM_GEM_CMA_DRIVER_OPS,
.fops = &dcss_cma_fops,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/imx/imx-drm-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static const struct drm_ioctl_desc imx_drm_ioctls[] = {
/* none so far */
};

static struct drm_driver imx_drm_driver = {
static const struct drm_driver imx_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
DRM_GEM_CMA_DRIVER_OPS,
.ioctls = imx_drm_ioctls,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ingenic/ingenic-drm-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ static void ingenic_drm_disable_vblank(struct drm_crtc *crtc)

DEFINE_DRM_GEM_CMA_FOPS(ingenic_drm_fops);

static struct drm_driver ingenic_drm_driver_data = {
static const struct drm_driver ingenic_drm_driver_data = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
.name = "ingenic-drm",
.desc = "DRM module for Ingenic SoCs",
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/lima/lima_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ DEFINE_DRM_GEM_FOPS(lima_drm_driver_fops);
* - 1.1.0 - add heap buffer support
*/

static struct drm_driver lima_drm_driver = {
static const struct drm_driver lima_drm_driver = {
.driver_features = DRIVER_RENDER | DRIVER_GEM | DRIVER_SYNCOBJ,
.open = lima_drm_driver_open,
.postclose = lima_drm_driver_postclose,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mcde/mcde_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int mcde_modeset_init(struct drm_device *drm)

DEFINE_DRM_GEM_CMA_FOPS(drm_fops);

static struct drm_driver mcde_drm_driver = {
static const struct drm_driver mcde_drm_driver = {
.driver_features =
DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
.lastclose = drm_fb_helper_lastclose,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mediatek/mtk_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,
return drm_gem_prime_import_dev(dev, dma_buf, private->dma_dev);
}

static struct drm_driver mtk_drm_driver = {
static const struct drm_driver mtk_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,

.dumb_create = mtk_drm_gem_dumb_create,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/meson/meson_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int meson_dumb_create(struct drm_file *file, struct drm_device *dev,

DEFINE_DRM_GEM_CMA_FOPS(fops);

static struct drm_driver meson_driver = {
static const struct drm_driver meson_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,

/* IRQ */
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mgag200/mgag200_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module_param_named(modeset, mgag200_modeset, int, 0400);

DEFINE_DRM_GEM_FOPS(mgag200_driver_fops);

static struct drm_driver mgag200_driver = {
static const struct drm_driver mgag200_driver = {
.driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET,
.fops = &mgag200_driver_fops,
.name = DRIVER_NAME,
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/msm/msm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static int msm_init_vram(struct drm_device *dev)
return ret;
}

static int msm_drm_init(struct device *dev, struct drm_driver *drv)
static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
{
struct platform_device *pdev = to_platform_device(dev);
struct drm_device *ddev;
Expand Down Expand Up @@ -984,7 +984,7 @@ static const struct file_operations fops = {
.mmap = msm_gem_mmap,
};

static struct drm_driver msm_driver = {
static const struct drm_driver msm_driver = {
.driver_features = DRIVER_GEM |
DRIVER_RENDER |
DRIVER_ATOMIC |
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/mxsfb/mxsfb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static irqreturn_t mxsfb_irq_handler(int irq, void *data)

DEFINE_DRM_GEM_CMA_FOPS(fops);

static struct drm_driver mxsfb_driver = {
static const struct drm_driver mxsfb_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
.irq_handler = mxsfb_irq_handler,
.irq_preinstall = mxsfb_irq_disable,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/omapdrm/omap_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static const struct file_operations omapdriver_fops = {
.llseek = noop_llseek,
};

static struct drm_driver omap_drm_driver = {
static const struct drm_driver omap_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM |
DRIVER_ATOMIC | DRIVER_RENDER,
.open = dev_open,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/panfrost/panfrost_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ DEFINE_DRM_GEM_FOPS(panfrost_drm_driver_fops);
* - 1.0 - initial interface
* - 1.1 - adds HEAP and NOEXEC flags for CREATE_BO
*/
static struct drm_driver panfrost_drm_driver = {
static const struct drm_driver panfrost_drm_driver = {
.driver_features = DRIVER_RENDER | DRIVER_GEM | DRIVER_SYNCOBJ,
.open = panfrost_open,
.postclose = panfrost_postclose,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/pl111/pl111_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ pl111_gem_import_sg_table(struct drm_device *dev,

DEFINE_DRM_GEM_CMA_FOPS(drm_fops);

static struct drm_driver pl111_drm_driver = {
static const struct drm_driver pl111_drm_driver = {
.driver_features =
DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
.ioctls = NULL,
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static struct pci_device_id pciidlist[] = {

MODULE_DEVICE_TABLE(pci, pciidlist);

static struct drm_driver kms_driver;
static const struct drm_driver kms_driver;

bool radeon_device_is_virtual(void);

Expand Down Expand Up @@ -629,7 +629,7 @@ static const struct drm_ioctl_desc radeon_ioctls_kms[] = {
DRM_IOCTL_DEF_DRV(RADEON_GEM_USERPTR, radeon_gem_userptr_ioctl, DRM_AUTH|DRM_RENDER_ALLOW),
};

static struct drm_driver kms_driver = {
static const struct drm_driver kms_driver = {
.driver_features =
DRIVER_GEM | DRIVER_RENDER | DRIVER_MODESET,
.load = radeon_driver_load_kms,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/rcar-du/rcar_du_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ MODULE_DEVICE_TABLE(of, rcar_du_of_table);

DEFINE_DRM_GEM_CMA_FOPS(rcar_du_fops);

static struct drm_driver rcar_du_driver = {
static const struct drm_driver rcar_du_driver = {
.driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC,
DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE(rcar_du_dumb_create),
.fops = &rcar_du_fops,
Expand Down
Loading

0 comments on commit 70a59dd

Please sign in to comment.