Skip to content

Commit

Permalink
Documentation/spi/spidev_test.c: constify some variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
congwang authored and Linus Torvalds committed Oct 16, 2007
1 parent 328329a commit cd58310
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Documentation/spi/spidev_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"
Expand All @@ -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' },
Expand Down

0 comments on commit cd58310

Please sign in to comment.