]> Pileus Git - ~andy/linux/commit
staging: wlan-ng: Fix problem with wrong arguments
authorEmil Goode <emilgoode@gmail.com>
Fri, 17 Aug 2012 17:31:04 +0000 (19:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 19:23:52 +0000 (12:23 -0700)
commit01f8a27e3c9109c0187f473e593fa7b45cdb65e8
tree409aaecbee4fb1700aff7a82645cf394ab107501
parentd947d635924379f806d43ad0e166c277ca84e3a0
staging: wlan-ng: Fix problem with wrong arguments

The function pointer scan in struct cfg80211_ops is not
supposed to be assigned a function with a struct net_device
pointer as an argument. Instead access the net_device struct
in the following way:

struct net_device *dev = request->wdev->netdev;

sparse gives these warnings:

drivers/staging/wlan-ng/cfg80211.c:726:17: warning:
        incorrect type in initializer (incompatible argument 2
        (different base types))
        expected int ( *scan )( ... )
        got int ( extern [toplevel] *<noident> )( ... )

drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
        initialization from incompatible pointer type [enabled by default]

drivers/staging/wlan-ng/cfg80211.c:726:2: warning:
        (near initialization for ‘prism2_usb_cfg_ops.scan’)
        [enabled by default]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/cfg80211.c