Skip to content

Commit 0be2bfd

Browse files
ArvindYadavCsJiri Kosina
authored andcommitted
HID: sensor: constify platform_device_id
platform_device_id are not supposed to change at runtime. All functions working with platform_device_id provided by <linux/platform_device.h> work with const platform_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent b0f847e commit 0be2bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-sensor-custom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ static int hid_sensor_custom_remove(struct platform_device *pdev)
823823
return 0;
824824
}
825825

826-
static struct platform_device_id hid_sensor_custom_ids[] = {
826+
static const struct platform_device_id hid_sensor_custom_ids[] = {
827827
{
828828
.name = "HID-SENSOR-2000e1",
829829
},

0 commit comments

Comments
 (0)