From a357e777b5982d5f460a2783d697a8a90d497348 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 9 Dec 2009 12:34:13 -0800 Subject: serial: Char: cyclades, fix compiler warning With gcc 4.0.2: drivers/char/cyclades.c: In function 'cyy_interrupt': drivers/char/cyclades.c:581: warning: 'info' may be used uninitialized in this function introduced by : commit 3aeea5b92210083c7cffd4f08a0bb141d3f2d574 : Author: Jiri Slaby : AuthorDate: Sat Sep 19 13:13:16 2009 -0700 : Commit: Live-CD User : CommitDate: Sat Sep 19 13:13:16 2009 -0700 : : cyclades: introduce cyy_readb/writeb In fact the true branch which uses uninitialized 'info' can never happen because chip is always less than ->nchips and channel is always less than 4 which we alloc. So behave similar to rx handling and remove the test completely. I wonder why gcc 4.4.1 doesn't spit a word. Reported-by: Andrew Morton Cc: Alan Cox Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/char/cyclades.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/char/cyclades.c') diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 4254457d391..274e9651fa3 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -598,12 +598,6 @@ static void cyy_chip_tx(struct cyclades_card *cinfo, unsigned int chip, save_car = readb(base_addr + (CyCAR << index)); cy_writeb(base_addr + (CyCAR << index), save_xir); - /* validate the port# (as configured and open) */ - if (channel + chip * 4 >= cinfo->nports) { - cy_writeb(base_addr + (CySRER << index), - readb(base_addr + (CySRER << index)) & ~CyTxRdy); - goto end; - } info = &cinfo->ports[channel + chip * 4]; tty = tty_port_tty_get(&info->port); if (tty == NULL) { -- cgit v1.2.3-70-g09d2 From 2090436357c20afad377a61c789f502c36d637de Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 9 Dec 2009 12:34:14 -0800 Subject: serial: cyclades: allow overriding ISA defaults also when the driver is built-in Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/char/cyclades.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'drivers/char/cyclades.c') diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 274e9651fa3..e026f244792 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -158,13 +158,11 @@ static unsigned int cy_isa_addresses[] = { #define NR_ISA_ADDRS ARRAY_SIZE(cy_isa_addresses) -#ifdef MODULE static long maddr[NR_CARDS]; static int irq[NR_CARDS]; module_param_array(maddr, long, NULL, 0); module_param_array(irq, int, NULL, 0); -#endif #endif /* CONFIG_ISA */ @@ -3310,13 +3308,10 @@ static int __init cy_detect_isa(void) unsigned short cy_isa_irq, nboard; void __iomem *cy_isa_address; unsigned short i, j, cy_isa_nchan; -#ifdef MODULE int isparam = 0; -#endif nboard = 0; -#ifdef MODULE /* Check for module parameters */ for (i = 0; i < NR_CARDS; i++) { if (maddr[i] || i) { @@ -3326,7 +3321,6 @@ static int __init cy_detect_isa(void) if (!maddr[i]) break; } -#endif /* scan the address table probing for Cyclom-Y/ISA boards */ for (i = 0; i < NR_ISA_ADDRS; i++) { @@ -3347,11 +3341,10 @@ static int __init cy_detect_isa(void) iounmap(cy_isa_address); continue; } -#ifdef MODULE + if (isparam && i < NR_CARDS && irq[i]) cy_isa_irq = irq[i]; else -#endif /* find out the board's irq by probing */ cy_isa_irq = detect_isa_irq(cy_isa_address); if (cy_isa_irq == 0) { -- cgit v1.2.3-70-g09d2 From e6c4ef984ebbd1a0458503417da91f3de47cbbe0 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 13 Jan 2010 23:34:18 +0000 Subject: tty: declare MODULE_FIRMWARE in various drivers Signed-off-by: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- drivers/char/cyclades.c | 1 + drivers/char/ip2/ip2main.c | 2 ++ drivers/char/isicom.c | 5 +++++ drivers/char/moxa.c | 3 +++ drivers/serial/icom.c | 4 +++- drivers/usb/serial/keyspan_pda.c | 7 +++++++ 6 files changed, 21 insertions(+), 1 deletion(-) (limited to 'drivers/char/cyclades.c') diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index e026f244792..b861c08263a 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -4195,3 +4195,4 @@ module_exit(cy_cleanup_module); MODULE_LICENSE("GPL"); MODULE_VERSION(CY_VERSION); MODULE_ALIAS_CHARDEV_MAJOR(CYCLADES_MAJOR); +MODULE_FIRMWARE("cyzfirm.bin"); diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index c2c915a9766..911e1da6def 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c @@ -3209,3 +3209,5 @@ static struct pci_device_id ip2main_pci_tbl[] __devinitdata = { }; MODULE_DEVICE_TABLE(pci, ip2main_pci_tbl); + +MODULE_FIRMWARE("intelliport2.bin"); diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 77d5a29ce80..be2e8f9a27c 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -1720,3 +1720,8 @@ module_exit(isicom_exit); MODULE_AUTHOR("MultiTech"); MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech"); MODULE_LICENSE("GPL"); +MODULE_FIRMWARE("isi608.bin"); +MODULE_FIRMWARE("isi608em.bin"); +MODULE_FIRMWARE("isi616em.bin"); +MODULE_FIRMWARE("isi4608.bin"); +MODULE_FIRMWARE("isi4616.bin"); diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 49a1fc2ec6f..166495d6a1d 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -172,6 +172,9 @@ static unsigned int numports[MAX_BOARDS]; MODULE_AUTHOR("William Chen"); MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver"); MODULE_LICENSE("GPL"); +MODULE_FIRMWARE("c218tunx.cod"); +MODULE_FIRMWARE("cp204unx.cod"); +MODULE_FIRMWARE("c320tunx.cod"); module_param_array(type, uint, NULL, 0); MODULE_PARM_DESC(type, "card type: C218=2, C320=4"); diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index 0028b6f89ce..6e715b78d7a 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c @@ -1654,4 +1654,6 @@ MODULE_DESCRIPTION("IBM iSeries Serial IOA driver"); MODULE_SUPPORTED_DEVICE ("IBM iSeries 2745, 2771, 2772, 2742, 2793 and 2805 Communications adapters"); MODULE_LICENSE("GPL"); - +MODULE_FIRMWARE("icom_call_setup.bin"); +MODULE_FIRMWARE("icom_res_dce.bin"); +MODULE_FIRMWARE("icom_asc.bin"); diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 1296a097f5c..84f08e968e0 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -789,6 +789,13 @@ static int keyspan_pda_fake_startup(struct usb_serial *serial) return 1; } +#ifdef KEYSPAN +MODULE_FIRMWARE("keyspan_pda/keyspan_pda.fw"); +#endif +#ifdef XIRCOM +MODULE_FIRMWARE("keyspan_pda/xircom_pgs.fw"); +#endif + static int keyspan_pda_startup(struct usb_serial *serial) { -- cgit v1.2.3-70-g09d2