2010-12-21 01:02:10

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 0/7] Small patches from compat-wirelss for mainline

These patches were in compat-wirelss and could go upstream, so we do not
have to maintain them any more.

Hauke Mehrtens (7):
wl1251: remove unnecessary import
wl12xx: remove unnecessary import
ssb: Use pci_is_pcie()
rt2x00: Use pci_is_pcie()
ath5k: Use pci_is_pcie()
ath9k: Use pci_is_pcie()
rtlwifi: Use pci_pcie_cap()

drivers/net/wireless/ath/ath5k/attach.c | 2 +-
drivers/net/wireless/ath/ath5k/reset.c | 4 ++--
drivers/net/wireless/ath/ath9k/pci.c | 2 +-
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
drivers/net/wireless/rtlwifi/pci.c | 2 +-
drivers/net/wireless/wl1251/boot.c | 1 -
drivers/net/wireless/wl12xx/boot.c | 1 -
drivers/ssb/scan.c | 4 ++--
8 files changed, 8 insertions(+), 10 deletions(-)



2010-12-21 15:19:58

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/7] wl1251: remove unnecessary import

Hauke Mehrtens <[email protected]> writes:

> No function declared in gpio.h is used here.

That's right, thanks.

> CC: Kalle Valo <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>

Acked-by: Kalle Valo <[email protected]>

--
Kalle Valo

2010-12-21 01:02:09

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 1/7] wl1251: remove unnecessary import

No function declared in gpio.h is used here.

CC: Kalle Valo <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/wl1251/boot.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl1251/boot.c b/drivers/net/wireless/wl1251/boot.c
index 61572df..d729daf 100644
--- a/drivers/net/wireless/wl1251/boot.c
+++ b/drivers/net/wireless/wl1251/boot.c
@@ -19,7 +19,6 @@
*
*/

-#include <linux/gpio.h>
#include <linux/slab.h>

#include "reg.h"
--
1.7.1


2010-12-21 01:02:19

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 6/7] ath9k: Use pci_is_pcie()

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/ath/ath9k/pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 7ca8499..2136242 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -96,7 +96,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common)
struct pci_dev *pdev = to_pci_dev(sc->dev);
u8 aspm;

- if (!pdev->is_pcie)
+ if (!pci_is_pcie(pdev))
return;

pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);
--
1.7.1


2010-12-21 01:02:12

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 2/7] wl12xx: remove unnecessary import

No function declared in gpio.h is used here.

CC: Luciano Coelho <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/wl12xx/boot.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/boot.c b/drivers/net/wireless/wl12xx/boot.c
index 4a9f929..4df04f8 100644
--- a/drivers/net/wireless/wl12xx/boot.c
+++ b/drivers/net/wireless/wl12xx/boot.c
@@ -21,7 +21,6 @@
*
*/

-#include <linux/gpio.h>
#include <linux/slab.h>

#include "acx.h"
--
1.7.1


2010-12-21 01:02:16

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 4/7] rt2x00: Use pci_is_pcie()

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Ivo van Doorn <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index 28e6ff1..73631c6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -286,7 +286,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
rt2x00dev->irq = pci_dev->irq;
rt2x00dev->name = pci_name(pci_dev);

- if (pci_dev->is_pcie)
+ if (pci_is_pcie(pci_dev))
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
else
rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
--
1.7.1


2010-12-21 03:48:35

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH 7/7] rtlwifi: Use pci_pcie_cap()

On 12/20/2010 07:01 PM, Hauke Mehrtens wrote:
> Use function pci_pcie_cap() instead of accessing struct member directly.
>
> CC: Larry Finger <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---

Is this change really necessary? The inline routine expands exactly to the code
that you replaced. The change just adds one extra layer of obscurity.

If this really is a desirable change, then add
Tested-by: Larry Finger <[email protected]>

Larry

2010-12-21 01:02:17

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 5/7] ath5k: Use pci_is_pcie()

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/ath/ath5k/attach.c | 2 +-
drivers/net/wireless/ath/ath5k/reset.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
index 9dbc1fa..cdac5cf 100644
--- a/drivers/net/wireless/ath/ath5k/attach.c
+++ b/drivers/net/wireless/ath/ath5k/attach.c
@@ -276,7 +276,7 @@ int ath5k_hw_init(struct ath5k_softc *sc)
/*
* Write PCI-E power save settings
*/
- if ((ah->ah_version == AR5K_AR5212) && pdev && (pdev->is_pcie)) {
+ if ((ah->ah_version == AR5K_AR5212) && pdev && (pci_is_pcie(pdev))) {
ath5k_hw_reg_write(ah, 0x9248fc00, AR5K_PCIE_SERDES);
ath5k_hw_reg_write(ah, 0x24924924, AR5K_PCIE_SERDES);

diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c
index bc84aaa..7297d7b 100644
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -537,7 +537,7 @@ int ath5k_hw_on_hold(struct ath5k_hw *ah)
* we ingore that flag for PCI-E cards. On PCI cards
* this flag gets cleared after 64 PCI clocks.
*/
- bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
+ bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;

if (ah->ah_version == AR5K_AR5210) {
ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
@@ -594,7 +594,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
* we ingore that flag for PCI-E cards. On PCI cards
* this flag gets cleared after 64 PCI clocks.
*/
- bus_flags = (pdev && pdev->is_pcie) ? 0 : AR5K_RESET_CTL_PCI;
+ bus_flags = (pdev && pci_is_pcie(pdev)) ? 0 : AR5K_RESET_CTL_PCI;

if (ah->ah_version == AR5K_AR5210) {
ret = ath5k_hw_nic_reset(ah, AR5K_RESET_CTL_PCU |
--
1.7.1


2010-12-21 01:02:13

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 3/7] ssb: Use pci_is_pcie()

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Michael Buesch <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/ssb/scan.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index ee079ab..5a0985d 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -405,10 +405,10 @@ int ssb_bus_scan(struct ssb_bus *bus,
/* Ignore PCI cores on PCI-E cards.
* Ignore PCI-E cores on PCI cards. */
if (dev->id.coreid == SSB_DEV_PCI) {
- if (bus->host_pci->is_pcie)
+ if (pci_is_pcie(bus->host_pci))
continue;
} else {
- if (!bus->host_pci->is_pcie)
+ if (!pci_is_pcie(bus->host_pci))
continue;
}
}
--
1.7.1


2010-12-21 01:02:21

by Hauke Mehrtens

[permalink] [raw]
Subject: [PATCH 7/7] rtlwifi: Use pci_pcie_cap()

Use function pci_pcie_cap() instead of accessing struct member directly.

CC: Larry Finger <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>
---
drivers/net/wireless/rtlwifi/pci.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index bf3b574..353e203 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1608,7 +1608,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv->ndis_adapter.pcibridge_funcnum =
PCI_FUNC(bridge_pdev->devfn);
pcipriv->ndis_adapter.pcibridge_pciehdr_offset =
- bridge_pdev->pcie_cap;
+ pci_pcie_cap(bridge_pdev);
pcipriv->ndis_adapter.pcicfg_addrport =
(pcipriv->ndis_adapter.pcibridge_busnum << 16) |
(pcipriv->ndis_adapter.pcibridge_devnum << 11) |
--
1.7.1


2010-12-21 09:32:58

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH 2/7] wl12xx: remove unnecessary import

On Tue, 2010-12-21 at 02:01 +0100, ext Hauke Mehrtens wrote:
> No function declared in gpio.h is used here.
>
> CC: Luciano Coelho <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>
> ---

Acked-by: Luciano Coelho <[email protected]>

John, please apply this together with the rest of this set, to keep
things simple.

--
Cheers,
Luca.


2010-12-21 07:42:11

by Gertjan van Wingerde

[permalink] [raw]
Subject: Re: [PATCH 4/7] rt2x00: Use pci_is_pcie()

On 12/21/10 02:01, Hauke Mehrtens wrote:
> Use function pci_is_pcie() instead of accessing struct member directly.
>
> CC: Ivo van Doorn <[email protected]>
> Signed-off-by: Hauke Mehrtens <[email protected]>

Acked-by: Gertjan van Wingerde <[email protected]>

> ---
> drivers/net/wireless/rt2x00/rt2x00pci.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
> index 28e6ff1..73631c6 100644
> --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
> @@ -286,7 +286,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
> rt2x00dev->irq = pci_dev->irq;
> rt2x00dev->name = pci_name(pci_dev);
>
> - if (pci_dev->is_pcie)
> + if (pci_is_pcie(pci_dev))
> rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
> else
> rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);


2010-12-21 11:50:54

by Ivo Van Doorn

[permalink] [raw]
Subject: Re: [PATCH 4/7] rt2x00: Use pci_is_pcie()

> On 12/21/10 02:01, Hauke Mehrtens wrote:
>> Use function pci_is_pcie() instead of accessing struct member directly.
>>
>> CC: Ivo van Doorn <[email protected]>
>> Signed-off-by: Hauke Mehrtens <[email protected]>
>
> Acked-by: Gertjan van Wingerde <[email protected]>

Acked-by: Ivo van Doorn <[email protected]>

>> ---
>> ?drivers/net/wireless/rt2x00/rt2x00pci.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
>> index 28e6ff1..73631c6 100644
>> --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
>> +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
>> @@ -286,7 +286,7 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
>> ? ? ? rt2x00dev->irq = pci_dev->irq;
>> ? ? ? rt2x00dev->name = pci_name(pci_dev);
>>
>> - ? ? if (pci_dev->is_pcie)
>> + ? ? if (pci_is_pcie(pci_dev))
>> ? ? ? ? ? ? ? rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCIE);
>> ? ? ? else
>> ? ? ? ? ? ? ? rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>