[PATCH 5/8] staging: comedi: gsc_hpdi: make board name pointer const

Ian Abbott abbotti at mev.co.uk
Thu Nov 1 16:28:31 UTC 2012


Change the type of the `name` member of `struct hpdi_board` from `char
*` to `const char *` as it should not be modifiable.

Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
 drivers/staging/comedi/drivers/gsc_hpdi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c
index 2246338..adcc002 100644
--- a/drivers/staging/comedi/drivers/gsc_hpdi.c
+++ b/drivers/staging/comedi/drivers/gsc_hpdi.c
@@ -186,8 +186,7 @@ static unsigned int fifo_size(uint32_t fifo_size_bits)
 }
 
 struct hpdi_board {
-
-	char *name;
+	const char *name;	/*  board name */
 	int device_id;		/*  pci device id */
 	int subdevice_id;	/*  pci subdevice id */
 };
-- 
1.7.12.4




More information about the devel mailing list