Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1252341
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Arnd Bergmann <arnd@arndb.de> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/19] staging/wilc1000: use device pointer for phy creation |
| Date | Wed, 21 Oct 2015 01:00:04 +0200 |
| Message-ID | <qlO2U-10k-49@gated-at.bofh.it> (permalink) |
| References | <qlNTc-O7-17@gated-at.bofh.it> |
| X-Original-To | linux-wireless@vger.kernel.org |
| X-Mailer | git-send-email 2.1.0.rc2 |
| X-Provags-ID | V03:K0:LcNTUb6KChZRVQhoarfPz71km892C7PDk5dMq3fewfrmwbrOdb4 VspyRBaCjhWLKXjHJqgyYBmTZ0ZwddQPFz0hNnJUgjSdnhTj6SgSb4girenYmg417FLWybd ykL4GHXvLwsxC7IM0ZS+vDYWDvrFIPnpNebeKHWZfAB14JnyTROv/adXu/3qm5DRVTPIPmY imT/i1x9lRR4ErUp4dgkg== |
| X-Ui-Out-Filterresults | notjunk:1;V01:K0:UQUYRZSPP6o=:ZyykuDjRbdAZdzl9DbGgtZ ILovbUdA7lhbFtSPwneypuHPhyw4kJWbkDJKGijQ0YcngLw83pWly7RH4pYbaBSqyhWSB7q7r UQjoR/H55XsCC40oOP0V3W23J3133APFYDWBDZ4Oml60/RFBnn4ssYs/JKwj6LQRmAX2tjf2+ KhlLUwW+s+I8H6dc7kzAoJgqIFMC9tRRTDe5vGHyxRBjJZezLgeli0Z7nekNGGalhCJz71801 yZCgPV7ARCZSJOabTWYFRYIKMJ1J6daGM1erteWq7lP2LC3IUXrqgeiucU+LK8h4/e3KlEGh3 cD4FVDx/5Dgh0Nod4YGyij4ZUsUl3Rifsg34IWlUGHDIQIw65eSLQ7hKf5z1UnPq5NcIyweaG 00aNA/19efPcyS75Sr3Oh31I4oCp+vxF8tKcIHaXaZ0S3IxzaAT97nn9bzzR9QZwl4CPxnIXn 9gxCQ1Co2tg4UhaZAiSmMlUq/3Fd5HJY3K00exZwZVvxQeAbf5cf41UwqzU8NlVeP4Fp0qZi9 ofq8nfh3UNg394lDSm0P5z9KikPCfP2RospaB2jIKuwEnwukQMKA5fbanBLFHabqOsk3DDlyz 8KLtkJLW1zXeYEUZTRDYClG95yUMpbaSRjskoJ0j9Ugsq8TT+N5JusIE4C8v3A567K+d2wCRE hc1vbvBMAmkzuoWhU35WEosMDi8MBPJxpAxSLeQauncbrtwpJPBdA5m/ioYEjm3Vn4S8= |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 92 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Rachel Kim <rachel.kim@atmel.com>, devel@driverdev.osuosl.org, Chris Park <chris.park@atmel.com>, gregkh@linuxfoundation.org, Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>, Johnny Kim <johnny.kim@atmel.com>, linux-kernel@vger.kernel.org, Tony Cho <tony.cho@atmel.com>, Glen Lee <glen.lee@atmel.com>, Leo Kim <leo.kim@atmel.com>, Arnd Bergmann <arnd@arndb.de> |
| X-Original-Date | Wed, 21 Oct 2015 00:47:31 +0200 |
| X-Original-Message-ID | <1445381258-1455986-13-git-send-email-arnd@arndb.de> |
| X-Original-References | <1445381258-1455986-1-git-send-email-arnd@arndb.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1252341 |
Show key headers only | View raw
wilc_create_wiphy tries to get a pointer to a device from the
global wilc1000_sdio_func variable. This is a layering violation
and we can use the wilc1000_dev->dev pointer instead.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/wilc1000/linux_wlan.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 ++-------
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +-
drivers/staging/wilc1000/wilc_wlan.h | 1 +
4 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index aa6f5c7db139..abcb70bb1bd7 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1638,7 +1638,7 @@ int wilc_netdev_init(struct device *dev, const struct wilc1000_ops *ops)
{
struct wireless_dev *wdev;
/*Register WiFi*/
- wdev = wilc_create_wiphy(ndev);
+ wdev = wilc_create_wiphy(ndev, wilc1000_dev->dev);
/* set netdev, tony */
if (dev)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 702c40c1df4b..7405fb8bae42 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -11,9 +11,6 @@
*/
#include "wilc_wfi_cfgoperations.h"
-#ifdef WILC_SDIO
-#include "linux_wlan_sdio.h"
-#endif
#include "host_interface.h"
#include <linux/errno.h>
@@ -3379,7 +3376,7 @@ _fail_:
* @date 01 MAR 2012
* @version 1.0
*/
-struct wireless_dev *wilc_create_wiphy(struct net_device *net)
+struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *dev)
{
struct wilc_priv *priv;
struct wireless_dev *wdev;
@@ -3431,9 +3428,7 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net)
wdev->wiphy->max_scan_ssids, wdev->wiphy->max_scan_ie_len, wdev->wiphy->signal_type,
wdev->wiphy->interface_modes, wdev->iftype);
- #ifdef WILC_SDIO
- set_wiphy_dev(wdev->wiphy, &wilc1000_sdio_func->dev);
- #endif
+ set_wiphy_dev(wdev->wiphy, dev);
/*Register wiphy structure*/
s32Error = wiphy_register(wdev->wiphy);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 158d98c0eb87..ab53d9d59081 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -10,7 +10,7 @@
#define NM_WFI_CFGOPERATIONS
#include "wilc_wfi_netdevice.h"
-struct wireless_dev *wilc_create_wiphy(struct net_device *net);
+struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *dev);
void wilc_free_wiphy(struct net_device *net);
int WILC_WFI_update_stats(struct wiphy *wiphy, u32 pktlen, u8 changed);
int wilc_deinit_host_int(struct net_device *net);
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 8c5253cce97c..2297e31b5b75 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -2,6 +2,7 @@
#define WILC_WLAN_H
#include <linux/types.h>
+#include <linux/netdevice.h>
#define ISWILC1000(id) (((id & 0xfffff000) == 0x100000) ? 1 : 0)
--
2.1.0.rc2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
[PATCH 17/19] staging/wilc1000: pass hif operations through initialization Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
[PATCH 19/19] [RFC] staging/wilc1000: use more regular probing Arnd Bergmann <arnd@arndb.de> - 2015-10-21 00:50 +0200
[PATCH 08/19] staging/wilc1000: move wilc_wlan_inp_t into struct wilc Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 10/19] staging/wilc1000: unify device pointer Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 04/19] staging/wilc1000: move extern declarations to headers Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 05/19] staging/wilc1000: use NO_SECURITY instead of NO_ENCRYPT Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 16/19] staging/wilc1000: remove WILC_SDIO/WILC_SPI macros Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 14/19] staging/wilc1000: get rid of WILC_SDIO_IRQ_GPIO Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 01/19] staging/wilc1000: remove unused functions Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
Re: [PATCH 01/19] staging/wilc1000: remove unused functions Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 09:30 +0100
[PATCH 06/19] staging/wilc1000: avoid static definitions in header Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 09/19] staging/wilc1000: move init/exit functions to driver files Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 07/19] staging/wilc1000: remove linux_wlan_{device_power,device_detection} Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 13/19] staging/wilc1000: move COMPLEMENT_BOOT code to linux_wlan_sdio.c Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 18/19] staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH] fixup! staging/wilc1000: split out bus specific modules Arnd Bergmann <arnd@arndb.de> - 2015-10-21 16:30 +0200
[PATCH 02/19] staging/wilc1000: make symbols static if possible Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
[PATCH 12/19] staging/wilc1000: use device pointer for phy creation Arnd Bergmann <arnd@arndb.de> - 2015-10-21 01:00 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-21 12:10 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-21 13:00 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups Arnd Bergmann <arnd@arndb.de> - 2015-10-22 14:30 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups glen lee <glen.lee@atmel.com> - 2015-10-23 03:40 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-23 10:00 +0200
Re: [PATCH 00/19] staging/wilc1000 cleanups Tony Cho <tony.cho@atmel.com> - 2015-10-27 08:20 +0100
csiph-web