Skip to content

Commit 2c720b4

Browse files
rbmarliereweiny2
authored andcommitted
dax: constify the struct device_type usage
Since commit aed65af ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the dax_mapping_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ira Weiny <[email protected]>
1 parent dbc8fc9 commit 2c720b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dax/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ static const struct attribute_group *dax_mapping_attribute_groups[] = {
818818
NULL,
819819
};
820820

821-
static struct device_type dax_mapping_type = {
821+
static const struct device_type dax_mapping_type = {
822822
.release = dax_mapping_release,
823823
.groups = dax_mapping_attribute_groups,
824824
};

0 commit comments

Comments
 (0)