* [Patch]Documentation/spi/spidev_test.c: constify some variables
@ 2007-10-06 2:02 WANG Cong
2007-10-06 2:12 ` David Brownell
0 siblings, 1 reply; 2+ messages in thread
From: WANG Cong @ 2007-10-06 2:02 UTC (permalink / raw)
To: LKML; +Cc: David Brownell, Andrew Morton, spi-devel-general, Anton Vorontsov
Constify two char pointers and a struct in Documentation/spi/spidev_test.c.
CC: David Brownell <dbrownell@users.sourceforge.net>
CC: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
---
Documentation/spi/spidev_test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6.23-rc9/Documentation/spi/spidev_test.c
===================================================================
--- linux-2.6.23-rc9.orig/Documentation/spi/spidev_test.c
+++ linux-2.6.23-rc9/Documentation/spi/spidev_test.c
@@ -29,7 +29,7 @@ static void pabort(const char *s)
abort();
}
-static char *device = "/dev/spidev1.1";
+static const char *device = "/dev/spidev1.1";
static uint8_t mode;
static uint8_t bits = 8;
static uint32_t speed = 500000;
@@ -69,7 +69,7 @@ static void transfer(int fd)
puts("");
}
-void print_usage(char *prog)
+void print_usage(const char *prog)
{
printf("Usage: %s [-DsbdlHOLC3]\n", prog);
puts(" -D --device device to use (default /dev/spidev1.1)\n"
@@ -88,7 +88,7 @@ void print_usage(char *prog)
void parse_opts(int argc, char *argv[])
{
while (1) {
- static struct option lopts[] = {
+ static const struct option lopts[] = {
{ "device", 1, 0, 'D' },
{ "speed", 1, 0, 's' },
{ "delay", 1, 0, 'd' },
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch]Documentation/spi/spidev_test.c: constify some variables
2007-10-06 2:02 [Patch]Documentation/spi/spidev_test.c: constify some variables WANG Cong
@ 2007-10-06 2:12 ` David Brownell
0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2007-10-06 2:12 UTC (permalink / raw)
To: xiyou.wangcong, linux-kernel; +Cc: spi-devel-general, avorontsov, akpm
> From: WANG Cong <xiyou.wangcong@gmail.com>
>
> Constify two char pointers and a struct in Documentation/spi/spidev_test.c.
>
> CC: David Brownell <dbrownell@users.sourceforge.net>
ACK
> CC: Anton Vorontsov <avorontsov@ru.mvista.com>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-06 2:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-06 2:02 [Patch]Documentation/spi/spidev_test.c: constify some variables WANG Cong
2007-10-06 2:12 ` David Brownell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®