From 5f3b361a12e121f52fae586798a775606a3bab6b Mon Sep 17 00:00:00 2001 From: Emil Goode Date: Sat, 29 Dec 2012 16:27:17 +0100 Subject: [PATCH] Staging: wlan-ng: Add missing argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The commit c8442118 introduced a struct wireless_dev pointer as a second argument of the function pointers set_tx_power and get_tx_power. This patch adds the missing arguments for the wlan-ng driver. Sparse warnings: drivers/staging/wlan-ng/cfg80211.c:735:25: warning: incorrect type in initializer (incompatible argument 2 (different base types)) drivers/staging/wlan-ng/cfg80211.c:735:25: expected int ( *set_tx_power )( ... ) drivers/staging/wlan-ng/cfg80211.c:735:25: got int ( extern [toplevel] * )( ... ) drivers/staging/wlan-ng/cfg80211.c:736:25: warning: incorrect type in initializer (incompatible argument 2 (different base types)) drivers/staging/wlan-ng/cfg80211.c:736:25: expected int ( *get_tx_power )( ... ) drivers/staging/wlan-ng/cfg80211.c:736:25: got int ( extern [toplevel] * )( ... ) drivers/staging/wlan-ng/cfg80211.c:735:2: warning: initialization from incompatible pointer type [enabled by default] drivers/staging/wlan-ng/cfg80211.c:735:2: warning: (near initialization for ‘prism2_usb_cfg_ops.set_tx_power’) [enabled by default] drivers/staging/wlan-ng/cfg80211.c:736:2: warning: initialization from incompatible pointer type [enabled by default] drivers/staging/wlan-ng/cfg80211.c:736:2: warning: (near initialization for ‘prism2_usb_cfg_ops.get_tx_power’) [enabled by default] Signed-off-by: Emil Goode Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wlan-ng/cfg80211.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 18c06a59c091..1d31eab19d16 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -638,8 +638,8 @@ int prism2_leave_ibss(struct wiphy *wiphy, struct net_device *dev) } -int prism2_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, - int mbm) +int prism2_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, + enum nl80211_tx_power_setting type, int mbm) { struct prism2_wiphy_private *priv = wiphy_priv(wiphy); wlandevice_t *wlandev = priv->wlandev; @@ -665,7 +665,8 @@ exit: return err; } -int prism2_get_tx_power(struct wiphy *wiphy, int *dbm) +int prism2_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, + int *dbm) { struct prism2_wiphy_private *priv = wiphy_priv(wiphy); wlandevice_t *wlandev = priv->wlandev; -- 2.20.1