[RESEND PATCH 0/3] drivers/mfd: Constify static attribute_group structs

2021-03-02 Thread Rikard Falkeborn
Seems the first submission somehow didn't make it to LKML, here's a resend. The only usage of the structs is to pass their address to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make them const to allow the compiler to put them in read

[PATCH 0/3] drivers/mfd: Constify static attribute_group structs

2021-01-31 Thread Rikard Falkeborn
The only usage of the structs is to pass their address to sysfs_create_group() and sysfs_remove_group(), both which takes pointers to const attribute_group structs. Make them const to allow the compiler to put them in read-only memory. Done with the help of coccinelle. With these patches applied,