diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-10 16:49:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:19 -0500 |
commit | 21795094e2b71b4b11bfb468321046c1336cef69 (patch) | |
tree | de99ccc0f93ba165574db3b55fd9c0839dd65bed /drivers/net/wireless/rt2x00/rt2x00pci.c | |
parent | f590f48e87d1e61c03f01fa15be00e852c05426d (diff) |
rt2x00: make csr_cache and csr_addr an union
The csr_cache and csr_addr pointers are both the same size
and they are never used both by the same driver. This makes
them a nice candidate for an union.
We could merge into 1 pointer, but that would either upset sparse,
or require a lot of __force casts.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 238f1c1e4ad0..b8c6a8c9d6d2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -350,9 +350,9 @@ static void rt2x00pci_free_reg(struct rt2x00_dev *rt2x00dev) | |||
350 | kfree(rt2x00dev->eeprom); | 350 | kfree(rt2x00dev->eeprom); |
351 | rt2x00dev->eeprom = NULL; | 351 | rt2x00dev->eeprom = NULL; |
352 | 352 | ||
353 | if (rt2x00dev->csr_addr) { | 353 | if (rt2x00dev->csr.base) { |
354 | iounmap(rt2x00dev->csr_addr); | 354 | iounmap(rt2x00dev->csr.base); |
355 | rt2x00dev->csr_addr = NULL; | 355 | rt2x00dev->csr.base = NULL; |
356 | } | 356 | } |
357 | } | 357 | } |
358 | 358 | ||
@@ -360,9 +360,9 @@ static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev) | |||
360 | { | 360 | { |
361 | struct pci_dev *pci_dev = rt2x00dev_pci(rt2x00dev); | 361 | struct pci_dev *pci_dev = rt2x00dev_pci(rt2x00dev); |
362 | 362 | ||
363 | rt2x00dev->csr_addr = ioremap(pci_resource_start(pci_dev, 0), | 363 | rt2x00dev->csr.base = ioremap(pci_resource_start(pci_dev, 0), |
364 | pci_resource_len(pci_dev, 0)); | 364 | pci_resource_len(pci_dev, 0)); |
365 | if (!rt2x00dev->csr_addr) | 365 | if (!rt2x00dev->csr.base) |
366 | goto exit; | 366 | goto exit; |
367 | 367 | ||
368 | rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL); | 368 | rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL); |