aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2007-10-16 04:27:47 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:10 -0400
commitcd58310d775fc10cc820b27c10f619187b8c4133 (patch)
treec8478f1ace7eca09fc19ad1f93bba5226cd45d8b
parent328329a7bda52a8ed413cd485211463581f7abab (diff)
Documentation/spi/spidev_test.c: constify some variables
Constify two char pointers and a struct in Documentation/spi/spidev_test.c. Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/spi/spidev_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/spi/spidev_test.c b/Documentation/spi/spidev_test.c
index 218e86215297..cf0e3ce0d526 100644
--- a/Documentation/spi/spidev_test.c
+++ b/Documentation/spi/spidev_test.c
@@ -29,7 +29,7 @@ static void pabort(const char *s)
29 abort(); 29 abort();
30} 30}
31 31
32static char *device = "/dev/spidev1.1"; 32static const char *device = "/dev/spidev1.1";
33static uint8_t mode; 33static uint8_t mode;
34static uint8_t bits = 8; 34static uint8_t bits = 8;
35static uint32_t speed = 500000; 35static uint32_t speed = 500000;
@@ -69,7 +69,7 @@ static void transfer(int fd)
69 puts(""); 69 puts("");
70} 70}
71 71
72void print_usage(char *prog) 72void print_usage(const char *prog)
73{ 73{
74 printf("Usage: %s [-DsbdlHOLC3]\n", prog); 74 printf("Usage: %s [-DsbdlHOLC3]\n", prog);
75 puts(" -D --device device to use (default /dev/spidev1.1)\n" 75 puts(" -D --device device to use (default /dev/spidev1.1)\n"
@@ -88,7 +88,7 @@ void print_usage(char *prog)
88void parse_opts(int argc, char *argv[]) 88void parse_opts(int argc, char *argv[])
89{ 89{
90 while (1) { 90 while (1) {
91 static struct option lopts[] = { 91 static const struct option lopts[] = {
92 { "device", 1, 0, 'D' }, 92 { "device", 1, 0, 'D' },
93 { "speed", 1, 0, 's' }, 93 { "speed", 1, 0, 's' },
94 { "delay", 1, 0, 'd' }, 94 { "delay", 1, 0, 'd' },