]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: Staging: atomisp: constify driver_attribute
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 31 Aug 2017 07:48:37 +0000 (03:48 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sat, 23 Sep 2017 19:01:56 +0000 (15:01 -0400)
driver_attribute are not supposed to change at runtime.
Functions driver_create_file/driver_remove_file are working with
const driver_attribute. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_drvfs.c

index 1ae2358de8d4c769aa6a413493ec37229a842f24..9f74b2dcbfaf54b2e312552888bdeb16d228e19a 100644 (file)
@@ -162,7 +162,7 @@ static ssize_t iunit_dbgopt_store(struct device_driver *drv, const char *buf,
        return size;
 }
 
-static struct driver_attribute iunit_drvfs_attrs[] = {
+static const struct driver_attribute iunit_drvfs_attrs[] = {
        __ATTR(dbglvl, 0644, iunit_dbglvl_show, iunit_dbglvl_store),
        __ATTR(dbgfun, 0644, iunit_dbgfun_show, iunit_dbgfun_store),
        __ATTR(dbgopt, 0644, iunit_dbgopt_show, iunit_dbgopt_store),