Skip to contentSkip to conversation

parport: make parport_ip32_ops const and __initconst

PATCH New Bhumika Goyal 1 participant 1 message Sep 18, 2017 Parallel port

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parport: make parport_ip32_ops const and __initconst

Make this const as it is only used during a copy operation. This usage is inside init function and the structure is not referenced after initialisation, so make it __initconst too.

---
 drivers/parport/parport_ip32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/parport/parport_ip32.c +1 -1
index 0186db7..6287307 100644
@@ -1769,7 +1769,7 @@ static size_t parport_ip32_ecp_write_data(struct parport *p,
 
 /*--- Default parport operations ---------------------------------------*/
 
-static __initdata struct parport_operations parport_ip32_ops = {
+static const struct parport_operations parport_ip32_ops __initconst = {
 	.write_data		= parport_ip32_write_data,
 	.read_data		= parport_ip32_read_data,
 
Signature · 1 line
1.9.1