From: Frank Seidel <fseidel@suse.de>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Jan Engelhardt <jengelh@computergmbh.de>,
Greg Kroah-Hartman <gregkh@suse.de>,
jirislaby@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/3] nozomi: finish constification
Date: Fri, 1 Feb 2008 09:14:05 +0100 [thread overview]
Message-ID: <200802010914.05840.fseidel@suse.de> (raw)
In-Reply-To: <200802010909.11634.fseidel@suse.de>
From: Frank Seidel <fseidel@suse.de>
Even some more constifications
Signed-off-by: Frank Seidel <fseidel@suse.de>
---
drivers/char/nozomi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -395,7 +395,7 @@ struct buffer {
} __attribute__ ((packed));
/* Global variables */
-static struct pci_device_id nozomi_pci_tbl[] __devinitdata = {
+static const struct pci_device_id nozomi_pci_tbl[] __devinitconst = {
{PCI_DEVICE(VENDOR1, DEVICE1)},
{},
};
@@ -778,13 +778,13 @@ static void disable_transmit_dl(enum por
* Return 1 - send buffer to card and ack.
* Return 0 - don't ack, don't send buffer to card.
*/
-static int send_data(enum port_type index, struct nozomi *dc)
+static int send_data(enum port_type index, const struct nozomi *dc)
{
u32 size = 0;
const struct port *port = &dc->port[index];
- u8 toggle = port->toggle_ul;
+ const u8 toggle = port->toggle_ul;
void __iomem *addr = port->ul_addr[toggle];
- u32 ul_size = port->ul_size[toggle];
+ const u32 ul_size = port->ul_size[toggle];
struct tty_struct *tty = port->tty;
/* Get data from tty and place in buf for now */
@@ -1732,7 +1732,7 @@ static int ntty_tiocmset(struct tty_stru
static int ntty_cflags_changed(struct port *port, unsigned long flags,
struct async_icount *cprev)
{
- struct async_icount cnow = port->tty_icount;
+ const struct async_icount cnow = port->tty_icount;
int ret;
ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) ||
@@ -1747,7 +1747,7 @@ static int ntty_cflags_changed(struct po
static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp)
{
- struct async_icount cnow = port->tty_icount;
+ const struct async_icount cnow = port->tty_icount;
struct serial_icounter_struct icount;
icount.cts = cnow.cts;
@@ -1858,7 +1858,7 @@ exit_in_buffer:
return rval;
}
-static struct tty_operations tty_ops = {
+static const struct tty_operations tty_ops = {
.ioctl = ntty_ioctl,
.open = ntty_open,
.close = ntty_close,
prev parent reply other threads:[~2008-02-01 8:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 21:10 [PATCH] nozomi: constify driver Frank Seidel
2008-01-31 21:39 ` Jan Engelhardt
2008-02-01 6:25 ` Frank Seidel
2008-02-01 7:28 ` Sam Ravnborg
2008-02-01 7:59 ` Frank Seidel
2008-02-01 8:09 ` [PATCH v2 0/3] nozomi: driver updates to current git tree Frank Seidel
2008-02-01 8:13 ` [PATCH v2 1/3] nozomi: minor cleanups (already in gregkh-2.6) Frank Seidel
2008-02-01 8:13 ` [PATCH v2 2/3] nozomi: constify driver Frank Seidel
2008-02-01 8:14 ` Frank Seidel [this message]
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=200802010914.05840.fseidel@suse.de \
--to=fseidel@suse.de \
--cc=gregkh@suse.de \
--cc=jengelh@computergmbh.de \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.