Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1734291 > unrolled thread

[PATCH] parport: make parport_ip32_ops const and __initconst

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-09-18 18:40 +0200
Last post2017-09-18 18:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] parport: make parport_ip32_ops const and __initconst Bhumika Goyal <bhumirks@gmail.com> - 2017-09-18 18:40 +0200

#1734291 — [PATCH] parport: make parport_ip32_ops const and __initconst

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-09-18 18:40 +0200
Subject[PATCH] parport: make parport_ip32_ops const and __initconst
Message-ID<ur7fs-fa-17@gated-at.bofh.it>
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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/parport/parport_ip32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/parport/parport_ip32.c b/drivers/parport/parport_ip32.c
index 0186db7..6287307 100644
--- a/drivers/parport/parport_ip32.c
+++ b/drivers/parport/parport_ip32.c
@@ -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,
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web