From: Linus Torvalds Date: Fri, 6 Aug 2010 19:25:06 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 X-Git-Tag: v3.0~4096 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1685e633b396b0f3dabbc9fa5d65dfefe6435250;p=platform%2Fkernel%2Flinux-amlogic.git Merge git://git./linux/kernel/git/brodo/pcmcia-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: pcmcia: avoid buffer overflow in pcmcia_setup_isa_irq pcmcia: do not request windows if you don't need to pcmcia: insert PCMCIA device resources into resource tree pcmcia: export resource information to sysfs pcmcia: use struct resource for PCMCIA devices, part 2 pcmcia: remove memreq_t pcmcia: move local definitions out of include/pcmcia/cs.h pcmcia: do not use io_req_t when calling pcmcia_request_io() pcmcia: do not use io_req_t after call to pcmcia_request_io() pcmcia: use struct resource for PCMCIA devices pcmcia: clean up cs.h pcmcia: use pcmica_{read,write}_config_byte pcmcia: remove cs_types.h pcmcia: remove unused flag, simplify headers pcmcia: remove obsolete CS_EVENT_ definitions pcmcia: split up central event handler pcmcia: simplify event callback pcmcia: remove obsolete ioctl Conflicts in: - drivers/staging/comedi/drivers/* - drivers/staging/wlags49_h2/wl_cs.c due to dev_info_t and whitespace changes --- 1685e633b396b0f3dabbc9fa5d65dfefe6435250 diff --cc drivers/staging/comedi/drivers/cb_das16_cs.c index 6d893c6,7cf0ccb..f8ede11 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@@ -662,14 -661,14 +661,6 @@@ static void das16cs_pcmcia_detach(struc less on other parts of the kernel. */ --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static dev_info_t dev_info = "cb_das16_cs"; -- struct local_info_t { struct pcmcia_device *link; int stop; @@@ -846,7 -842,7 +833,7 @@@ struct pcmcia_driver das16cs_driver = .id_table = das16cs_id_table, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "cb_das16_cs", }, }; diff --cc drivers/staging/comedi/drivers/das08_cs.c index fb561ab,9ee677f..c6aa52f --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@@ -132,14 -131,14 +131,6 @@@ static void das08_pcmcia_detach(struct less on other parts of the kernel. */ --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static const dev_info_t dev_info = "pcm-das08"; -- struct local_info_t { struct pcmcia_device *link; int stop; @@@ -362,7 -359,7 +350,7 @@@ struct pcmcia_driver das08_cs_driver = .id_table = das08_cs_id_table, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "pcm-das08", }, }; diff --cc drivers/staging/comedi/drivers/ni_daq_700.c index 701abd9,bf2e84a..cc15666 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@@ -459,14 -458,14 +458,6 @@@ static void dio700_cs_detach(struct pcm less on other parts of the kernel. */ --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static const dev_info_t dev_info = "ni_daq_700"; -- struct local_info_t { struct pcmcia_device *link; int stop; @@@ -722,7 -695,7 +686,7 @@@ struct pcmcia_driver dio700_cs_driver .id_table = dio700_cs_ids, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "ni_daq_700", }, }; diff --cc drivers/staging/comedi/drivers/ni_daq_dio24.c index 0b65f24,9112e70..773ae20 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@@ -211,14 -210,14 +210,6 @@@ static void dio24_cs_detach(struct pcmc less on other parts of the kernel. */ --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static const dev_info_t dev_info = "ni_daq_dio24"; -- struct local_info_t { struct pcmcia_device *link; int stop; @@@ -473,7 -445,7 +436,7 @@@ struct pcmcia_driver dio24_cs_driver = .id_table = dio24_cs_ids, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "ni_daq_dio24", }, }; diff --cc drivers/staging/comedi/drivers/ni_labpc_cs.c index 163245e,f204961..68c4ecb --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@@ -189,14 -188,14 +188,6 @@@ static void labpc_cs_detach(struct pcmc less on other parts of the kernel. */ --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static const dev_info_t dev_info = "daqcard-1200"; -- struct local_info_t { struct pcmcia_device *link; int stop; @@@ -449,7 -420,7 +412,7 @@@ struct pcmcia_driver labpc_cs_driver = .id_table = labpc_cs_ids, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "daqcard-1200", }, }; diff --cc drivers/staging/comedi/drivers/ni_mio_cs.c index 3a46f0c,d50b6c4..1f24263 --- a/drivers/staging/comedi/drivers/ni_mio_cs.c +++ b/drivers/staging/comedi/drivers/ni_mio_cs.c @@@ -261,7 -260,7 +260,6 @@@ static void cs_release(struct pcmcia_de static void cs_detach(struct pcmcia_device *); static struct pcmcia_device *cur_dev = NULL; --static const dev_info_t dev_info = "ni_mio_cs"; static int cs_attach(struct pcmcia_device *link) { @@@ -450,7 -448,7 +447,7 @@@ struct pcmcia_driver ni_mio_cs_driver .id_table = ni_mio_cs_ids, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "ni_mio_cs", }, }; diff --cc drivers/staging/comedi/drivers/quatech_daqp_cs.c index 8b49cb1,25f4e67..bf489d7 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@@ -995,14 -995,14 +994,6 @@@ static int daqp_cs_resume(struct pcmcia static int daqp_cs_attach(struct pcmcia_device *); static void daqp_cs_detach(struct pcmcia_device *); --/* -- The dev_info variable is the "key" that is used to match up this -- device driver with appropriate cards, through the card configuration -- database. --*/ -- --static const dev_info_t dev_info = "quatech_daqp_cs"; -- /*====================================================================== daqp_cs_attach() creates an "instance" of the driver, allocating @@@ -1226,7 -1223,7 +1213,7 @@@ static struct pcmcia_driver daqp_cs_dri .id_table = daqp_cs_id_table, .owner = THIS_MODULE, .drv = { -- .name = dev_info, ++ .name = "quatech_daqp_cs", }, }; diff --cc drivers/staging/wlags49_h2/wl_cs.c index 464b067,f15afd2..19c3354 --- a/drivers/staging/wlags49_h2/wl_cs.c +++ b/drivers/staging/wlags49_h2/wl_cs.c @@@ -133,36 -132,35 +132,35 @@@ extern dbg_info_t *DbgInfo ******************************************************************************/ static int wl_adapter_attach(struct pcmcia_device *link) { - struct net_device *dev; - struct wl_private *lp; - /*------------------------------------------------------------------------*/ - - DBG_FUNC( "wl_adapter_attach" ); - DBG_ENTER( DbgInfo ); - - dev = wl_device_alloc(); - if(dev == NULL) { - DBG_ERROR( DbgInfo, "wl_device_alloc returned NULL\n"); - return -ENOMEM; - } - - link->resource[0]->end = HCF_NUM_IO_PORTS; - link->resource[0]->flags = IO_DATA_PATH_WIDTH_16; - link->conf.Attributes = CONF_ENABLE_IRQ; - link->conf.IntType = INT_MEMORY_AND_IO; - link->conf.ConfigIndex = 5; - link->conf.Present = PRESENT_OPTION; - - link->priv = dev; - lp = wl_priv(dev); - lp->link = link; - - wl_adapter_insert(link); - - DBG_LEAVE( DbgInfo ); - return 0; -} // wl_adapter_attach + struct net_device *dev; + struct wl_private *lp; + /*--------------------------------------------------------------------*/ + + DBG_FUNC("wl_adapter_attach"); + DBG_ENTER(DbgInfo); + + dev = wl_device_alloc(); + if (dev == NULL) { + DBG_ERROR(DbgInfo, "wl_device_alloc returned NULL\n"); + return -ENOMEM; + } + - link->io.NumPorts1 = HCF_NUM_IO_PORTS; - link->io.Attributes1 = IO_DATA_PATH_WIDTH_16; - link->io.IOAddrLines = 6; ++ link->resource[0]->end = HCF_NUM_IO_PORTS; ++ link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; + link->conf.Attributes = CONF_ENABLE_IRQ; + link->conf.IntType = INT_MEMORY_AND_IO; + link->conf.ConfigIndex = 5; + link->conf.Present = PRESENT_OPTION; + + link->priv = dev; + lp = wl_priv(dev); + lp->link = link; + + wl_adapter_insert(link); + + DBG_LEAVE(DbgInfo); + return 0; +} /* wl_adapter_attach */ /*============================================================================*/ @@@ -290,59 -289,61 +288,60 @@@ static int wl_adapter_resume(struct pcm * N/A * ******************************************************************************/ -void wl_adapter_insert( struct pcmcia_device *link ) +void wl_adapter_insert(struct pcmcia_device *link) { - struct net_device *dev; - int i; - int ret; - /*------------------------------------------------------------------------*/ + struct net_device *dev; + int i; + int ret; + /*--------------------------------------------------------------------*/ - DBG_FUNC( "wl_adapter_insert" ); - DBG_ENTER( DbgInfo ); - DBG_PARAM( DbgInfo, "link", "0x%p", link ); + DBG_FUNC("wl_adapter_insert"); + DBG_ENTER(DbgInfo); + DBG_PARAM(DbgInfo, "link", "0x%p", link); - dev = link->priv; + dev = link->priv; - /* Do we need to allocate an interrupt? */ - link->conf.Attributes |= CONF_ENABLE_IRQ; - link->io_lines = 6; + /* Do we need to allocate an interrupt? */ + link->conf.Attributes |= CONF_ENABLE_IRQ; ++ link->io_lines = 6; - ret = pcmcia_request_io(link, &link->io); - ret = pcmcia_request_io(link); - if (ret != 0) - goto failed; ++ ret = pcmcia_request_io(link); + if (ret != 0) + goto failed; - ret = pcmcia_request_irq(link, (void *) wl_isr); - if (ret != 0) - goto failed; + ret = pcmcia_request_irq(link, (void *) wl_isr); + if (ret != 0) + goto failed; - ret = pcmcia_request_configuration(link, &link->conf); - if (ret != 0) - goto failed; + ret = pcmcia_request_configuration(link, &link->conf); + if (ret != 0) + goto failed; - dev->irq = link->irq; - dev->base_addr = link->resource[0]->start; + dev->irq = link->irq; - dev->base_addr = link->io.BasePort1; ++ dev->base_addr = link->resource[0]->start; - SET_NETDEV_DEV(dev, &link->dev); - if (register_netdev(dev) != 0) { - printk("%s: register_netdev() failed\n", MODULE_NAME); - goto failed; - } + SET_NETDEV_DEV(dev, &link->dev); + if (register_netdev(dev) != 0) { + printk("%s: register_netdev() failed\n", MODULE_NAME); + goto failed; + } - register_wlags_sysfs(dev); + register_wlags_sysfs(dev); - printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ", - dev->name, dev->base_addr, dev->irq); - for( i = 0; i < ETH_ALEN; i++ ) { - printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n')); - } + printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ", + dev->name, dev->base_addr, dev->irq); + for (i = 0; i < ETH_ALEN; i++) + printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n')); - DBG_LEAVE( DbgInfo ); - return; + DBG_LEAVE(DbgInfo); + return; failed: - wl_adapter_release( link ); + wl_adapter_release(link); - DBG_LEAVE(DbgInfo); - return; -} // wl_adapter_insert + DBG_LEAVE(DbgInfo); + return; +} /* wl_adapter_insert */ /*============================================================================*/