提交 18bbe0c2 编写于 作者: F Frank Seidel 提交者: Greg Kroah-Hartman

nozomi: finish constification

Even some more constifications
Signed-off-by: NFrank Seidel <fseidel@suse.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 71e1b4ab
...@@ -395,7 +395,7 @@ struct buffer { ...@@ -395,7 +395,7 @@ struct buffer {
} __attribute__ ((packed)); } __attribute__ ((packed));
/* Global variables */ /* 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)}, {PCI_DEVICE(VENDOR1, DEVICE1)},
{}, {},
}; };
...@@ -778,13 +778,13 @@ static void disable_transmit_dl(enum port_type port, struct nozomi *dc) ...@@ -778,13 +778,13 @@ static void disable_transmit_dl(enum port_type port, struct nozomi *dc)
* Return 1 - send buffer to card and ack. * Return 1 - send buffer to card and ack.
* Return 0 - don't ack, don't send buffer to card. * 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; u32 size = 0;
const struct port *port = &dc->port[index]; 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]; 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; struct tty_struct *tty = port->tty;
/* Get data from tty and place in buf for now */ /* Get data from tty and place in buf for now */
...@@ -1732,7 +1732,7 @@ static int ntty_tiocmset(struct tty_struct *tty, struct file *file, ...@@ -1732,7 +1732,7 @@ static int ntty_tiocmset(struct tty_struct *tty, struct file *file,
static int ntty_cflags_changed(struct port *port, unsigned long flags, static int ntty_cflags_changed(struct port *port, unsigned long flags,
struct async_icount *cprev) struct async_icount *cprev)
{ {
struct async_icount cnow = port->tty_icount; const struct async_icount cnow = port->tty_icount;
int ret; int ret;
ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) || ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) ||
...@@ -1747,7 +1747,7 @@ static int ntty_cflags_changed(struct port *port, unsigned long flags, ...@@ -1747,7 +1747,7 @@ static int ntty_cflags_changed(struct port *port, unsigned long flags,
static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp) 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; struct serial_icounter_struct icount;
icount.cts = cnow.cts; icount.cts = cnow.cts;
...@@ -1858,7 +1858,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty) ...@@ -1858,7 +1858,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty)
return rval; return rval;
} }
static struct tty_operations tty_ops = { static const struct tty_operations tty_ops = {
.ioctl = ntty_ioctl, .ioctl = ntty_ioctl,
.open = ntty_open, .open = ntty_open,
.close = ntty_close, .close = ntty_close,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册