summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-12-12 11:44:21 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 10:44:44 -0800
commitb8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90 (patch)
treeec16e6a3844396dd67af3f87c915cb272570cc98
parenta2ab3d30005cdce45c2c7e31ad6743ad7975609a (diff)
downloadlinux-stable-b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90.tar.gz
linux-stable-b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90.tar.bz2
linux-stable-b8ac9fc0e8cda9f9776019c5b0464b0c6d2d4c90.zip
uio: make uio_info's name and version const
These are only ever assigned constant strings and never modified. This was noticed because Wolfram Sang needed to cast the result of of_get_property() in order to assign it to the name field of a struct uio_info. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--Documentation/DocBook/uio-howto.tmpl4
-rw-r--r--include/linux/uio_driver.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 6116b93608df..b787e4721c90 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -393,12 +393,12 @@ offset = N * getpagesize();
<itemizedlist>
<listitem><para>
-<varname>char *name</varname>: Required. The name of your driver as
+<varname>const char *name</varname>: Required. The name of your driver as
it will appear in sysfs. I recommend using the name of your module for this.
</para></listitem>
<listitem><para>
-<varname>char *version</varname>: Required. This string appears in
+<varname>const char *version</varname>: Required. This string appears in
<filename>/sys/class/uio/uioX/version</filename>.
</para></listitem>
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index 20be327bfbb4..a0bb6bd2e5c1 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -76,8 +76,8 @@ struct uio_device;
*/
struct uio_info {
struct uio_device *uio_dev;
- char *name;
- char *version;
+ const char *name;
+ const char *version;
struct uio_mem mem[MAX_UIO_MAPS];
struct uio_port port[MAX_UIO_PORT_REGIONS];
long irq;