diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 12:42:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-05 12:42:59 -0500 |
commit | d9b2c4d0b03c721808c0d259e43a27f1e80205bc (patch) | |
tree | f17a4166f62ee14faa1401a6cbd353a4ab8c77cb /drivers/ata | |
parent | 27d16d08717faeaa8afd1b736a096dbaab90f08e (diff) | |
parent | 5fa9167a1bf5f5a4b7282f5e7ac56a4a5a1fa044 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6: (50 commits)
pcmcia: rework the irq_req_t typedef
pcmcia: remove deprecated handle_to_dev() macro
pcmcia: pcmcia_request_window() doesn't need a pointer to a pointer
pcmcia: remove unused "window_t" typedef
pcmcia: move some window-related code to pcmcia_ioctl.c
pcmcia: Change window_handle_t logic to unsigned long
pcmcia: Pass struct pcmcia_socket to pcmcia_get_mem_page()
pcmcia: Pass struct pcmcia_device to pcmcia_map_mem_page()
pcmcia: Pass struct pcmcia_device to pcmcia_release_window()
drivers/pcmcia: remove unnecessary kzalloc
pcmcia: correct handling for Zoomed Video registers in topic.h
pcmcia: fix printk formats
pcmcia: autoload module pcmcia
pcmcia/staging: update comedi drivers
PCMCIA: stop duplicating pci_irq in soc_pcmcia_socket
PCMCIA: ss: allow PCI IRQs > 255
PCMCIA: soc_common: remove 'dev' member from soc_pcmcia_socket
PCMCIA: soc_common: constify soc_pcmcia_socket ops member
PCMCIA: sa1111: remove duplicated initializers
PCMCIA: sa1111: wrap soc_pcmcia_socket to contain sa1111 specific data
...
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_pcmcia.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c index dc99e26f8e5b..1b392c9e8531 100644 --- a/drivers/ata/pata_pcmcia.c +++ b/drivers/ata/pata_pcmcia.c | |||
@@ -177,9 +177,6 @@ static struct ata_port_operations pcmcia_8bit_port_ops = { | |||
177 | .drain_fifo = pcmcia_8bit_drain_fifo, | 177 | .drain_fifo = pcmcia_8bit_drain_fifo, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | #define CS_CHECK(fn, ret) \ | ||
181 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | ||
182 | |||
183 | 180 | ||
184 | struct pcmcia_config_check { | 181 | struct pcmcia_config_check { |
185 | unsigned long ctl_base; | 182 | unsigned long ctl_base; |
@@ -252,7 +249,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
252 | struct ata_port *ap; | 249 | struct ata_port *ap; |
253 | struct ata_pcmcia_info *info; | 250 | struct ata_pcmcia_info *info; |
254 | struct pcmcia_config_check *stk = NULL; | 251 | struct pcmcia_config_check *stk = NULL; |
255 | int last_ret = 0, last_fn = 0, is_kme = 0, ret = -ENOMEM, p; | 252 | int is_kme = 0, ret = -ENOMEM, p; |
256 | unsigned long io_base, ctl_base; | 253 | unsigned long io_base, ctl_base; |
257 | void __iomem *io_addr, *ctl_addr; | 254 | void __iomem *io_addr, *ctl_addr; |
258 | int n_ports = 1; | 255 | int n_ports = 1; |
@@ -271,7 +268,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
271 | pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8; | 268 | pdev->io.Attributes2 = IO_DATA_PATH_WIDTH_8; |
272 | pdev->io.IOAddrLines = 3; | 269 | pdev->io.IOAddrLines = 3; |
273 | pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | 270 | pdev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
274 | pdev->irq.IRQInfo1 = IRQ_LEVEL_ID; | ||
275 | pdev->conf.Attributes = CONF_ENABLE_IRQ; | 271 | pdev->conf.Attributes = CONF_ENABLE_IRQ; |
276 | pdev->conf.IntType = INT_MEMORY_AND_IO; | 272 | pdev->conf.IntType = INT_MEMORY_AND_IO; |
277 | 273 | ||
@@ -296,8 +292,13 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
296 | } | 292 | } |
297 | io_base = pdev->io.BasePort1; | 293 | io_base = pdev->io.BasePort1; |
298 | ctl_base = stk->ctl_base; | 294 | ctl_base = stk->ctl_base; |
299 | CS_CHECK(RequestIRQ, pcmcia_request_irq(pdev, &pdev->irq)); | 295 | ret = pcmcia_request_irq(pdev, &pdev->irq); |
300 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(pdev, &pdev->conf)); | 296 | if (ret) |
297 | goto failed; | ||
298 | |||
299 | ret = pcmcia_request_configuration(pdev, &pdev->conf); | ||
300 | if (ret) | ||
301 | goto failed; | ||
301 | 302 | ||
302 | /* iomap */ | 303 | /* iomap */ |
303 | ret = -ENOMEM; | 304 | ret = -ENOMEM; |
@@ -351,8 +352,6 @@ static int pcmcia_init_one(struct pcmcia_device *pdev) | |||
351 | kfree(stk); | 352 | kfree(stk); |
352 | return 0; | 353 | return 0; |
353 | 354 | ||
354 | cs_failed: | ||
355 | cs_error(pdev, last_fn, last_ret); | ||
356 | failed: | 355 | failed: |
357 | kfree(stk); | 356 | kfree(stk); |
358 | info->ndev = 0; | 357 | info->ndev = 0; |