mtd: make device_type const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 19 Aug 2017 08:22:17 +0000 (13:52 +0530)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Mon, 21 Aug 2017 12:33:50 +0000 (14:33 +0200)
Make this const as it is only stored in the type field of a device
structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/mtdcore.c

index f872a99501ed0478bb4f5dc3ea86890d146c5ca1..e7ea842ba3dbfc49f4e93d9c54b5f2b2cfc09f68 100644 (file)
@@ -340,7 +340,7 @@ static struct attribute *mtd_attrs[] = {
 };
 ATTRIBUTE_GROUPS(mtd);
 
-static struct device_type mtd_devtype = {
+static const struct device_type mtd_devtype = {
        .name           = "mtd",
        .groups         = mtd_groups,
        .release        = mtd_release,