aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/sysfs.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-02 04:27:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-02 15:17:50 -0500
commit8efa5d7d6ad307ae2d220def37ca89594062c40d (patch)
treec56eac029c47751932a9b7c5a1432b53fbae3361 /drivers/net/wireless/ath/ath5k/sysfs.c
parent4aa5d783c9e1c72e4950ff34f388077ccecac74a (diff)
ath5k: Check if pci pdev struct is initialized in common functions.
To be able to support other busses than PCI check if pci device structure is initialized. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/sysfs.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/sysfs.c b/drivers/net/wireless/ath/ath5k/sysfs.c
index 90757de7bf59..929c68cdf8ab 100644
--- a/drivers/net/wireless/ath/ath5k/sysfs.c
+++ b/drivers/net/wireless/ath/ath5k/sysfs.c
@@ -95,7 +95,7 @@ static struct attribute_group ath5k_attribute_group_ani = {
95int 95int
96ath5k_sysfs_register(struct ath5k_softc *sc) 96ath5k_sysfs_register(struct ath5k_softc *sc)
97{ 97{
98 struct device *dev = &sc->pdev->dev; 98 struct device *dev = sc->dev;
99 int err; 99 int err;
100 100
101 err = sysfs_create_group(&dev->kobj, &ath5k_attribute_group_ani); 101 err = sysfs_create_group(&dev->kobj, &ath5k_attribute_group_ani);
@@ -110,7 +110,7 @@ ath5k_sysfs_register(struct ath5k_softc *sc)
110void 110void
111ath5k_sysfs_unregister(struct ath5k_softc *sc) 111ath5k_sysfs_unregister(struct ath5k_softc *sc)
112{ 112{
113 struct device *dev = &sc->pdev->dev; 113 struct device *dev = sc->dev;
114 114
115 sysfs_remove_group(&dev->kobj, &ath5k_attribute_group_ani); 115 sysfs_remove_group(&dev->kobj, &ath5k_attribute_group_ani);
116} 116}