mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: WANG Cong <xiyou.wangcong@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>,
	Andrew Morton <akpm@osdl.org>,
	spi-devel-general@lists.sourceforge.net,
	Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: [Patch]Documentation/spi/spidev_test.c: constify some variables
Date: Sat, 6 Oct 2007 10:02:29 +0800	[thread overview]
Message-ID: <20071006020229.GB2436@hacking> (raw)


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' },

             reply	other threads:[~2007-10-06  2:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06  2:02 WANG Cong [this message]
2007-10-06  2:12 ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071006020229.GB2436@hacking \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@osdl.org \
    --cc=avorontsov@ru.mvista.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®