From: Joe Perches <joe@perches.com>
To: Jiri Kosina <trivial@kernel.org>
Cc: Linux PCMCIA team <linux-pcmcia@lists.infradead.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [TRIVIAL PATCH 1/3] pcmcia: Make declaration and uses of struct pcmcia_device_id const
Date: Tue, 3 May 2011 19:29:00 -0700 [thread overview]
Message-ID: <e97be9cadd4e6f60bf230e6447bf68ae146f74e7.1304475548.git.joe@perches.com> (raw)
In-Reply-To: <cover.1304475547.git.joe@perches.com>
Const allows tables to be moved into text sections.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/pcmcia/ds.c | 6 +++---
include/pcmcia/ds.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 100c441..749c2a1 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -45,7 +45,7 @@ MODULE_LICENSE("GPL");
static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
{
- struct pcmcia_device_id *did = p_drv->id_table;
+ const struct pcmcia_device_id *did = p_drv->id_table;
unsigned int i;
u32 hash;
@@ -784,7 +784,7 @@ static inline int pcmcia_load_firmware(struct pcmcia_device *dev, char * filenam
static inline int pcmcia_devmatch(struct pcmcia_device *dev,
- struct pcmcia_device_id *did)
+ const struct pcmcia_device_id *did)
{
if (did->match_flags & PCMCIA_DEV_ID_MATCH_MANF_ID) {
if ((!dev->has_manf_id) || (dev->manf_id != did->manf_id))
@@ -890,7 +890,7 @@ static int pcmcia_bus_match(struct device *dev, struct device_driver *drv)
{
struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
struct pcmcia_driver *p_drv = to_pcmcia_drv(drv);
- struct pcmcia_device_id *did = p_drv->id_table;
+ const struct pcmcia_device_id *did = p_drv->id_table;
struct pcmcia_dynid *dynid;
/* match dynamic devices first */
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index 3fd5064..7b82080 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -56,7 +56,7 @@ struct pcmcia_driver {
int (*resume) (struct pcmcia_device *dev);
struct module *owner;
- struct pcmcia_device_id *id_table;
+ const struct pcmcia_device_id *id_table;
struct device_driver drv;
struct pcmcia_dynids dynids;
};
--
1.7.5.rc3.dirty
next prev parent reply other threads:[~2011-05-04 2:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 2:28 [TRIVIAL PATCH 0/3] pcmcia: Make " Joe Perches
2011-05-04 2:29 ` Joe Perches [this message]
2011-05-04 2:29 ` [TRIVIAL PATCH 2/3] pcmcia: Convert pcmcia_device_id declarations to const Joe Perches
2011-05-04 4:07 ` Kurt Van Dijck
2011-05-04 2:29 ` [TRIVIAL PATCH 3/3] staging: " Joe Perches
2011-05-06 6:15 ` [TRIVIAL PATCH 0/3] pcmcia: Make struct pcmcia_device_id const Dominik Brodowski
2011-05-06 18:04 ` Joe Perches
2011-05-11 8:51 ` Dominik Brodowski
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=e97be9cadd4e6f60bf230e6447bf68ae146f74e7.1304475548.git.joe@perches.com \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pcmcia@lists.infradead.org \
--cc=trivial@kernel.org \
/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®