[PATCH 08/11] pcmcia: ds: convert to use DRIVER_ATTR_RO
We are trying to get rid of DRIVER_ATTR(), and the pcmcia driver's attribute can be trivially changed to use DRIVER_ATTR_RO(). Cc: Russell King <rmk+ker...@armlinux.org.uk> Cc: <linux-pcmcia@lists.infradead.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- drivers/pcmcia/ds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 69b5e811ea2b..a9258f641cee 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -95,7 +95,7 @@ struct pcmcia_dynid { * and causes the driver to probe for all devices again. */ static ssize_t -pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count) +new_id_store(struct device_driver *driver, const char *buf, size_t count) { struct pcmcia_dynid *dynid; struct pcmcia_driver *pdrv = to_pcmcia_drv(driver); @@ -133,7 +133,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count) return retval; return count; } -static DRIVER_ATTR(new_id, S_IWUSR, NULL, pcmcia_store_new_id); +static DRIVER_ATTR_WO(new_id); static void pcmcia_free_dynids(struct pcmcia_driver *drv) -- 2.13.1 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 4.5 084/124] pcmcia: db1xxx_ss: fix last irq_to_gpio user
4.5-stable review patch. If anyone has any objections, please let me know. -- From: Manuel Lauss <manuel.la...@gmail.com> commit e34b6fcf9b09ec9d93503edd5f81489791ffd602 upstream. remove the usage of removed irq_to_gpio() function. On pre-DB1200 boards, pass the actual carddetect GPIO number instead of the IRQ, because we need the gpio to actually test card status (inserted or not) and can get the irq number with gpio_to_irq() instead. Tested on DB1300 and DB1500, this patch fixes PCMCIA on the DB1500, which used irq_to_gpio(). Fixes: 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h") Signed-off-by: Manuel Lauss <manuel.la...@gmail.com> Acked-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Linus Walleij <linus.wall...@linaro.org> Cc: linux-pcmcia@lists.infradead.org Cc: Linux-MIPS <linux-m...@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/12747/ Signed-off-by: Ralf Baechle <r...@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- arch/mips/alchemy/devboards/db1000.c | 18 -- arch/mips/alchemy/devboards/db1550.c |4 ++-- drivers/pcmcia/db1xxx_ss.c | 11 +-- 3 files changed, 19 insertions(+), 14 deletions(-) --- a/arch/mips/alchemy/devboards/db1000.c +++ b/arch/mips/alchemy/devboards/db1000.c @@ -503,15 +503,15 @@ int __init db1000_dev_setup(void) if (board == BCSR_WHOAMI_DB1500) { c0 = AU1500_GPIO2_INT; c1 = AU1500_GPIO5_INT; - d0 = AU1500_GPIO0_INT; - d1 = AU1500_GPIO3_INT; + d0 = 0; /* GPIO number, NOT irq! */ + d1 = 3; /* GPIO number, NOT irq! */ s0 = AU1500_GPIO1_INT; s1 = AU1500_GPIO4_INT; } else if (board == BCSR_WHOAMI_DB1100) { c0 = AU1100_GPIO2_INT; c1 = AU1100_GPIO5_INT; - d0 = AU1100_GPIO0_INT; - d1 = AU1100_GPIO3_INT; + d0 = 0; /* GPIO number, NOT irq! */ + d1 = 3; /* GPIO number, NOT irq! */ s0 = AU1100_GPIO1_INT; s1 = AU1100_GPIO4_INT; @@ -545,15 +545,15 @@ int __init db1000_dev_setup(void) } else if (board == BCSR_WHOAMI_DB1000) { c0 = AU1000_GPIO2_INT; c1 = AU1000_GPIO5_INT; - d0 = AU1000_GPIO0_INT; - d1 = AU1000_GPIO3_INT; + d0 = 0; /* GPIO number, NOT irq! */ + d1 = 3; /* GPIO number, NOT irq! */ s0 = AU1000_GPIO1_INT; s1 = AU1000_GPIO4_INT; platform_add_devices(db1000_devs, ARRAY_SIZE(db1000_devs)); } else if ((board == BCSR_WHOAMI_PB1500) || (board == BCSR_WHOAMI_PB1500R2)) { c0 = AU1500_GPIO203_INT; - d0 = AU1500_GPIO201_INT; + d0 = 1; /* GPIO number, NOT irq! */ s0 = AU1500_GPIO202_INT; twosocks = 0; flashsize = 64; @@ -566,7 +566,7 @@ int __init db1000_dev_setup(void) */ } else if (board == BCSR_WHOAMI_PB1100) { c0 = AU1100_GPIO11_INT; - d0 = AU1100_GPIO9_INT; + d0 = 9; /* GPIO number, NOT irq! */ s0 = AU1100_GPIO10_INT; twosocks = 0; flashsize = 64; @@ -583,7 +583,6 @@ int __init db1000_dev_setup(void) } else return 0; /* unknown board, no further dev setup to do */ - irq_set_irq_type(d0, IRQ_TYPE_EDGE_BOTH); irq_set_irq_type(c0, IRQ_TYPE_LEVEL_LOW); irq_set_irq_type(s0, IRQ_TYPE_LEVEL_LOW); @@ -597,7 +596,6 @@ int __init db1000_dev_setup(void) c0, d0, /*s0*/0, 0, 0); if (twosocks) { - irq_set_irq_type(d1, IRQ_TYPE_EDGE_BOTH); irq_set_irq_type(c1, IRQ_TYPE_LEVEL_LOW); irq_set_irq_type(s1, IRQ_TYPE_LEVEL_LOW); --- a/arch/mips/alchemy/devboards/db1550.c +++ b/arch/mips/alchemy/devboards/db1550.c @@ -514,7 +514,7 @@ static void __init db1550_devices(void) AU1000_PCMCIA_MEM_PHYS_ADDR + 0x00040 - 1, AU1000_PCMCIA_IO_PHYS_ADDR, AU1000_PCMCIA_IO_PHYS_ADDR + 0x1 - 1, - AU1550_GPIO3_INT, AU1550_GPIO0_INT, + AU1550_GPIO3_INT, 0, /*AU1550_GPIO21_INT*/0, 0, 0); db1x_register_pcmcia_socket( @@ -524,7 +524,7 @@ static void __init db1550_devices(void) AU1000_PCMCIA_MEM_PHYS_ADDR + 0x00440 - 1, AU1000_PCMCIA_IO_PHYS_ADDR + 0x00400, AU1000_PCMCIA_IO_PHYS_ADDR + 0x00401 - 1, - AU1550_GPIO5_INT, AU1550_GPIO1_INT, + AU1550_GPIO5_INT, 1, /*AU1550_GPIO22_INT*/0, 0, 1); platform_device_register(_nand_dev); --- a/drivers/pcmcia/db1xxx_ss.c +++ b
Re: randconfig build error with next-20150113, in drivers/pcmcia/rsrc_pci.c
On Tue, Jan 13, 2015 at 11:08:30AM -0700, Jim Davis wrote: Building with the attached random configuration file, drivers/pcmcia/rsrc_pci.c: In function ‘find_io_region’: drivers/pcmcia/rsrc_pci.c:40:2: error: implicit declaration of function ‘pci_bus_alloc_resource’ [-Werror=implicit-function-declaration] ret = pci_bus_alloc_resource(s-cb_dev-bus, res, num, 1, ^ drivers/pcmcia/rsrc_pci.c:40:40: error: dereferencing pointer to incomplete type ret = pci_bus_alloc_resource(s-cb_dev-bus, res, num, 1, ^ drivers/pcmcia/rsrc_pci.c: In function ‘res_pci_find_mem’: drivers/pcmcia/rsrc_pci.c:144:40: error: dereferencing pointer to incomplete type ret = pci_bus_alloc_resource(s-cb_dev-bus, ^ cc1: some warnings being treated as errors make[2]: *** [drivers/pcmcia/rsrc_pci.o] Error 1 I have a patch from Arnd to fix this that I'll queue up soon, thanks. greg k-h ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 07/11] pcmcia: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the pcmcia bus code to use the correct field. Cc: Bill Pemberton wf...@virginia.edu Cc: linux-pcmcia@lists.infradead.org Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/pcmcia/ds.c | 65 - 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 2deacbb..757119b 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -992,16 +992,17 @@ static ssize_t field##_show (struct device *dev, struct device_attribute *attr, { \ struct pcmcia_device *p_dev = to_pcmcia_dev(dev); \ return p_dev-test ? sprintf(buf, format, p_dev-field) : -ENODEV; \ -} +} \ +static DEVICE_ATTR_RO(field); #define pcmcia_device_stringattr(name, field) \ static ssize_t name##_show (struct device *dev, struct device_attribute *attr, char *buf) \ { \ struct pcmcia_device *p_dev = to_pcmcia_dev(dev); \ return p_dev-field ? sprintf(buf, %s\n, p_dev-field) : -ENODEV; \ -} +} \ +static DEVICE_ATTR_RO(name); -pcmcia_device_attr(func, socket, 0x%02x\n); pcmcia_device_attr(func_id, has_func_id, 0x%02x\n); pcmcia_device_attr(manf_id, has_manf_id, 0x%04x\n); pcmcia_device_attr(card_id, has_card_id, 0x%04x\n); @@ -1010,8 +1011,16 @@ pcmcia_device_stringattr(prod_id2, prod_id[1]); pcmcia_device_stringattr(prod_id3, prod_id[2]); pcmcia_device_stringattr(prod_id4, prod_id[3]); -static ssize_t pcmcia_show_resources(struct device *dev, -struct device_attribute *attr, char *buf) +static ssize_t function_show(struct device *dev, struct device_attribute *attr, +char *buf) +{ + struct pcmcia_device *p_dev = to_pcmcia_dev(dev); + return p_dev-socket ? sprintf(buf, 0x%02x\n, p_dev-func) : -ENODEV; +} +static DEVICE_ATTR_RO(function); + +static ssize_t resources_show(struct device *dev, + struct device_attribute *attr, char *buf) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); char *str = buf; @@ -1022,8 +1031,9 @@ static ssize_t pcmcia_show_resources(struct device *dev, return str - buf; } +static DEVICE_ATTR_RO(resources); -static ssize_t pcmcia_show_pm_state(struct device *dev, struct device_attribute *attr, char *buf) +static ssize_t pm_state_show(struct device *dev, struct device_attribute *attr, char *buf) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); @@ -1033,8 +1043,8 @@ static ssize_t pcmcia_show_pm_state(struct device *dev, struct device_attribute return sprintf(buf, on\n); } -static ssize_t pcmcia_store_pm_state(struct device *dev, struct device_attribute *attr, -const char *buf, size_t count) +static ssize_t pm_state_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); int ret = 0; @@ -1049,7 +1059,7 @@ static ssize_t pcmcia_store_pm_state(struct device *dev, struct device_attribute return ret ? ret : count; } - +static DEVICE_ATTR_RW(pm_state); static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1072,8 +1082,9 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, p_dev-func, p_dev-device_no, hash[0], hash[1], hash[2], hash[3]); } +static DEVICE_ATTR_RO(modalias); -static ssize_t pcmcia_store_allow_func_id_match(struct device *dev, +static ssize_t allow_func_id_match_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct pcmcia_device *p_dev = to_pcmcia_dev(dev); @@ -1088,22 +1099,24 @@ static ssize_t pcmcia_store_allow_func_id_match(struct device *dev, return count; } - -static struct device_attribute pcmcia_dev_attrs[] = { - __ATTR(function, 0444, func_show, NULL), - __ATTR(pm_state, 0644, pcmcia_show_pm_state, pcmcia_store_pm_state), - __ATTR(resources, 0444, pcmcia_show_resources, NULL), - __ATTR_RO(func_id), - __ATTR_RO(manf_id), - __ATTR_RO(card_id), - __ATTR_RO(prod_id1), - __ATTR_RO(prod_id2), - __ATTR_RO(prod_id3), - __ATTR_RO(prod_id4), - __ATTR_RO(modalias), - __ATTR(allow_func_id_match, 0200, NULL, pcmcia_store_allow_func_id_match), - __ATTR_NULL
Re: [PATCH v2 0/7] pcmcia: at91_cf: clean up and add DT support
On Wed, Jun 05, 2013 at 12:04:26PM +0200, Nicolas Ferre wrote: On 20/04/2013 00:54, Greg Kroah-Hartman : On Wed, Apr 17, 2013 at 10:51:23AM +0200, Nicolas Ferre wrote: On 04/17/2013 10:39 AM, Fabio Porcedda : On Thu, Mar 21, 2013 at 12:40 PM, Nicolas Ferre nicolas.fe...@atmel.com wrote: These patches clean up at91_cf a bit and add DT bindings. It is based on a previous series from Joachim Eastwood and other cleanup patches by Fabio and Laurent. I have collected them together as they are lying around for some time. Please tell me if It can go through PCMCIA tree or if Andrew or Greg can take them. Note that they are not bug fixes, so you can stack them for 3.10. Thanks for your help, best regards. v2: add 2 more cleanup patches: - move to module_platform_driver_probe() - little trivial indentation fix Fabio Porcedda (1): pcmcia: at91_cf: use module_platform_driver_probe() Joachim Eastwood (5): pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status pcmcia: at91_cf: convert to dev_ print functions pcmcia: at91_cf: use devm_ functions for allocations pcmcia: at91_cf: clean up header includes pcmcia: at91_cf: add support for DT Laurent Navet (1): pcmcia/trivial: at91_cf: fix checkpatch error .../devicetree/bindings/ata/atmel-at91_cf.txt | 19 +++ drivers/pcmcia/Kconfig | 2 +- drivers/pcmcia/at91_cf.c | 176 ++--- 3 files changed, 108 insertions(+), 89 deletions(-) create mode 100644 Documentation/devicetree/bindings/ata/atmel-at91_cf.txt -- 1.8.0 Ping? Andrew, Greg, can you please take this series? Here is the post on lkml: https://lkml.org/lkml/2013/3/21/246 Here is the first patch in patchwork (1/7): https://patchwork.kernel.org/patch/2312691/ Tell me if I can do something else to make this applied upstream... The PCMCIA maintainer should take these, not me. I know Greg, but this patch series is still not taken by anyone 3 months after its first submission and after several requests by both Fabio and myself... The series is still applying on linux-next today... Maybe it can go via Andrew, then... I can take them through my char/misc driver tree if it's been that long of a delay, care to resend them to me? thanks, greg k-h ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[ 06/31] pcmcia: sharpsl: dont discard sharpsl_pcmcia_ops
3.0-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann a...@arndb.de commit fdc858a466b738d35d3492bc7cf77b1dac98bf7c upstream. The sharpsl_pcmcia_ops structure gets passed into sa11xx_drv_pcmcia_probe, where it gets accessed at run-time, unlike all other pcmcia drivers that pass their structures into platform_device_add_data, which makes a copy. This means the gcc warning is valid and the structure must not be marked as __initdata. Without this patch, building collie_defconfig results in: drivers/pcmcia/pxa2xx_sharpsl.c:22:31: fatal error: mach-pxa/hardware.h: No such file or directory compilation terminated. make[3]: *** [drivers/pcmcia/pxa2xx_sharpsl.o] Error 1 make[2]: *** [drivers/pcmcia] Error 2 make[1]: *** [drivers] Error 2 make: *** [sub-make] Error 2 Signed-off-by: Arnd Bergmann a...@arndb.de Cc: Dominik Brodowski li...@dominikbrodowski.net Cc: Russell King rmk+ker...@arm.linux.org.uk Cc: Pavel Machek pa...@suse.cz Cc: linux-pcmcia@lists.infradead.org Cc: Jochen Friedrich joc...@scram.de Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/pcmcia/pxa2xx_sharpsl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -222,7 +222,7 @@ static void sharpsl_pcmcia_socket_suspen sharpsl_pcmcia_init_reset(skt); } -static struct pcmcia_low_level sharpsl_pcmcia_ops __initdata = { +static struct pcmcia_low_level sharpsl_pcmcia_ops = { .owner = THIS_MODULE, .hw_init= sharpsl_pcmcia_hw_init, .hw_shutdown= sharpsl_pcmcia_hw_shutdown, ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[ 10/42] pcmcia: sharpsl: dont discard sharpsl_pcmcia_ops
3.4-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann a...@arndb.de commit fdc858a466b738d35d3492bc7cf77b1dac98bf7c upstream. The sharpsl_pcmcia_ops structure gets passed into sa11xx_drv_pcmcia_probe, where it gets accessed at run-time, unlike all other pcmcia drivers that pass their structures into platform_device_add_data, which makes a copy. This means the gcc warning is valid and the structure must not be marked as __initdata. Without this patch, building collie_defconfig results in: drivers/pcmcia/pxa2xx_sharpsl.c:22:31: fatal error: mach-pxa/hardware.h: No such file or directory compilation terminated. make[3]: *** [drivers/pcmcia/pxa2xx_sharpsl.o] Error 1 make[2]: *** [drivers/pcmcia] Error 2 make[1]: *** [drivers] Error 2 make: *** [sub-make] Error 2 Signed-off-by: Arnd Bergmann a...@arndb.de Cc: Dominik Brodowski li...@dominikbrodowski.net Cc: Russell King rmk+ker...@arm.linux.org.uk Cc: Pavel Machek pa...@suse.cz Cc: linux-pcmcia@lists.infradead.org Cc: Jochen Friedrich joc...@scram.de Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/pcmcia/pxa2xx_sharpsl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -194,7 +194,7 @@ static void sharpsl_pcmcia_socket_suspen sharpsl_pcmcia_init_reset(skt); } -static struct pcmcia_low_level sharpsl_pcmcia_ops __initdata = { +static struct pcmcia_low_level sharpsl_pcmcia_ops = { .owner = THIS_MODULE, .hw_init= sharpsl_pcmcia_hw_init, .socket_state = sharpsl_pcmcia_socket_state, ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[ 14/85] pcmcia: sharpsl: dont discard sharpsl_pcmcia_ops
3.6-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann a...@arndb.de commit fdc858a466b738d35d3492bc7cf77b1dac98bf7c upstream. The sharpsl_pcmcia_ops structure gets passed into sa11xx_drv_pcmcia_probe, where it gets accessed at run-time, unlike all other pcmcia drivers that pass their structures into platform_device_add_data, which makes a copy. This means the gcc warning is valid and the structure must not be marked as __initdata. Without this patch, building collie_defconfig results in: drivers/pcmcia/pxa2xx_sharpsl.c:22:31: fatal error: mach-pxa/hardware.h: No such file or directory compilation terminated. make[3]: *** [drivers/pcmcia/pxa2xx_sharpsl.o] Error 1 make[2]: *** [drivers/pcmcia] Error 2 make[1]: *** [drivers] Error 2 make: *** [sub-make] Error 2 Signed-off-by: Arnd Bergmann a...@arndb.de Cc: Dominik Brodowski li...@dominikbrodowski.net Cc: Russell King rmk+ker...@arm.linux.org.uk Cc: Pavel Machek pa...@suse.cz Cc: linux-pcmcia@lists.infradead.org Cc: Jochen Friedrich joc...@scram.de Signed-off-by: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/pcmcia/pxa2xx_sharpsl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -194,7 +194,7 @@ static void sharpsl_pcmcia_socket_suspen sharpsl_pcmcia_init_reset(skt); } -static struct pcmcia_low_level sharpsl_pcmcia_ops __initdata = { +static struct pcmcia_low_level sharpsl_pcmcia_ops = { .owner = THIS_MODULE, .hw_init= sharpsl_pcmcia_hw_init, .socket_state = sharpsl_pcmcia_socket_state, ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 5/8] pcmcia: disable prefetch/burst for OZ6933
From: Tomas Kovacik n...@nodomain.sk Problems have been reported [1], so disable prefetch/burst, to be on the safe side. [1] http://www.mail-archive.com/linux-pcmcia@lists.infradead.org/msg02048.html Signed-off-by: Tomáš Kováčik n...@nodomain.sk Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/o2micro.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/pcmcia/o2micro.h b/drivers/pcmcia/o2micro.h index 5554015..72188c4 100644 --- a/drivers/pcmcia/o2micro.h +++ b/drivers/pcmcia/o2micro.h @@ -48,6 +48,9 @@ #ifndef PCI_DEVICE_ID_O2_6812 #define PCI_DEVICE_ID_O2_6812 0x6872 #endif +#ifndef PCI_DEVICE_ID_O2_6933 +#define PCI_DEVICE_ID_O2_6933 0x6933 +#endif /* Additional PCI configuration registers */ @@ -154,6 +157,7 @@ static int o2micro_override(struct yenta_socket *socket) case PCI_DEVICE_ID_O2_6812: case PCI_DEVICE_ID_O2_6832: case PCI_DEVICE_ID_O2_6836: + case PCI_DEVICE_ID_O2_6933: dev_printk(KERN_INFO, socket-dev-dev, Yenta O2: old bridge, disabling read prefetch/write burst\n); -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 4/8] pcmcia: fix incorrect argument order to list_add_tail()
From: Wolfram Sang w.s...@pengutronix.de Commit a56bc69a182f501582557af7fad5bc882b1c856c fixed a wrong usage of list_add_tail() within store_new_id() for PCI. Port the fix to PCMCIA, which adapted this function from PCI. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Cc: Dominik Brodowski li...@dominikbrodowski.net Cc: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/ds.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 304ff6d..9f300d3 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -236,7 +236,6 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count) if (!dynid) return -ENOMEM; - INIT_LIST_HEAD(dynid-node); dynid-id.match_flags = match_flags; dynid-id.manf_id = manf_id; dynid-id.card_id = card_id; @@ -246,7 +245,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count) memcpy(dynid-id.prod_id_hash, prod_id_hash, sizeof(__u32) * 4); spin_lock(pdrv-dynids.lock); - list_add_tail(pdrv-dynids.list, dynid-node); + list_add_tail(dynid-node, pdrv-dynids.list); spin_unlock(pdrv-dynids.lock); if (get_driver(pdrv-drv)) { -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 2/8] pcmcia: Use phys_addr_t for physical addresses
From: Steven A. Falco sfa...@harris.com Physical addresses are currently represented as int or long types. However, this does not work for processors like the PPC440EPx, which is a 32-bit processor with a 36-bit address space. This patch uses the phys_addr_t type, which correctly holds a 36-bit address on this processor. Signed-off-by: Steven A. Falco sfa...@harris.com Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- include/pcmcia/ss.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 9b4ac93..9a3b498 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h @@ -90,14 +90,14 @@ typedef struct pccard_io_map { u_char map; u_char flags; u_short speed; - u_int start, stop; + phys_addr_t start, stop; } pccard_io_map; typedef struct pccard_mem_map { u_char map; u_char flags; u_short speed; - u_long static_start; + phys_addr_t static_start; u_int card_start; struct resource *res; } pccard_mem_map; -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 3/8] pcmcia: drivers/pcmcia/pcmcia_resource.c: Remove unnecessary semicolons
From: Joe Perches j...@perches.com Signed-off-by: Joe Perches j...@perches.com Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/pcmcia_resource.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index f5d0ba8..8c2db2a 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -489,7 +489,7 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev, pccard_io_map iomap; if (!(s-state SOCKET_PRESENT)) - return -ENODEV;; + return -ENODEV; if (req-IntType INT_CARDBUS) { ds_dbg(p_dev-socket, 0, IntType may not be INT_CARDBUS\n); -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 8/8] pcmcia: document return value of pcmcia_loop_config
From: Wolfram Sang w.s...@pengutronix.de Hopefully it will be harder to get it wrong now. Also fix an unneeded initialization while we are here. Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/pcmcia_resource.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index 8c2db2a..d919e96 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -902,7 +902,7 @@ struct pcmcia_cfg_mem { * * pcmcia_loop_config() loops over all configuration options, and calls * the driver-specific conf_check() for each one, checking whether - * it is a valid one. + * it is a valid one. Returns 0 on success or errorcode otherwise. */ int pcmcia_loop_config(struct pcmcia_device *p_dev, int (*conf_check) (struct pcmcia_device *p_dev, @@ -915,7 +915,7 @@ int pcmcia_loop_config(struct pcmcia_device *p_dev, struct pcmcia_cfg_mem *cfg_mem; tuple_t *tuple; - int ret = -ENODEV; + int ret; unsigned int vcc; cfg_mem = kzalloc(sizeof(struct pcmcia_cfg_mem), GFP_KERNEL); -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 6/8] pcmcia: drop non-existant includes
From: Wolfram Sang w.s...@pengutronix.de See http://lists.infradead.org/pipermail/linux-pcmcia/2009-April/006109.html Reported-by: Robert P. J. Day rpj...@crashcourse.ca Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/au1000_pb1x00.c |1 - drivers/pcmcia/au1000_xxs1500.c |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c index d6b4bd1..b1984ed 100644 --- a/drivers/pcmcia/au1000_pb1x00.c +++ b/drivers/pcmcia/au1000_pb1x00.c @@ -26,7 +26,6 @@ #include linux/delay.h #include linux/ioport.h #include linux/kernel.h -#include linux/tqueue.h #include linux/timer.h #include linux/mm.h #include linux/proc_fs.h diff --git a/drivers/pcmcia/au1000_xxs1500.c b/drivers/pcmcia/au1000_xxs1500.c index 9627390..b43d47b 100644 --- a/drivers/pcmcia/au1000_xxs1500.c +++ b/drivers/pcmcia/au1000_xxs1500.c @@ -30,7 +30,6 @@ #include linux/delay.h #include linux/ioport.h #include linux/kernel.h -#include linux/tqueue.h #include linux/timer.h #include linux/mm.h #include linux/proc_fs.h -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia
[PATCH 1/8] pcmcia: drivers/pcmcia: Make static
From: Roel Kluin roel.kl...@gmail.com Sparse asked whether these could be static. Signed-off-by: Roel Kluin roel.kl...@gmail.com Signed-off-by: Wolfram Sang w.s...@pengutronix.de Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- drivers/pcmcia/pcmcia_ioctl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 6095f8d..7b424e0 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c @@ -286,7 +286,7 @@ static int pccard_get_status(struct pcmcia_socket *s, return 0; } /* pccard_get_status */ -int pccard_get_configuration_info(struct pcmcia_socket *s, +static int pccard_get_configuration_info(struct pcmcia_socket *s, struct pcmcia_device *p_dev, config_info_t *config) { -- 1.6.4.2 ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia