From: John W. Linville Date: Mon, 28 Jan 2013 19:43:00 +0000 (-0500) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4205e6ef4ee747aa81930537b6035086ba5f1e28;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem --- 4205e6ef4ee747aa81930537b6035086ba5f1e28 diff --cc drivers/nfc/pn544/i2c.c index 2a9c8d93d2e8,7f96ca2c46bd..8cf64c19f022 --- a/drivers/nfc/pn544/i2c.c +++ b/drivers/nfc/pn544/i2c.c @@@ -469,32 -461,10 +461,10 @@@ static struct i2c_driver pn544_hci_i2c_ }, .probe = pn544_hci_i2c_probe, .id_table = pn544_hci_i2c_id_table, - .remove = __devexit_p(pn544_hci_i2c_remove), + .remove = pn544_hci_i2c_remove, }; - static int __init pn544_hci_i2c_init(void) - { - int r; - - pr_debug(DRIVER_DESC ": %s\n", __func__); - - r = i2c_add_driver(&pn544_hci_i2c_driver); - if (r) { - pr_err(PN544_HCI_I2C_DRIVER_NAME - ": driver registration failed\n"); - return r; - } - - return 0; - } - - static void __exit pn544_hci_i2c_exit(void) - { - i2c_del_driver(&pn544_hci_i2c_driver); - } - - module_init(pn544_hci_i2c_init); - module_exit(pn544_hci_i2c_exit); + module_i2c_driver(pn544_hci_i2c_driver); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION(DRIVER_DESC); diff --cc net/wireless/reg.c index 82c4fc7c994c,6ea626b30a2a..de02d633c212 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@@ -2365,17 -2249,32 +2249,25 @@@ int set_regdom(const struct ieee80211_r return r; } -#ifdef CONFIG_HOTPLUG int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) { - if (last_request && !last_request->processed) { - if (add_uevent_var(env, "COUNTRY=%c%c", - last_request->alpha2[0], - last_request->alpha2[1])) - return -ENOMEM; + struct regulatory_request *lr; + u8 alpha2[2]; + bool add = false; + + rcu_read_lock(); + lr = get_last_request(); + if (lr && !lr->processed) { + memcpy(alpha2, lr->alpha2, 2); + add = true; } + rcu_read_unlock(); + if (add) + return add_uevent_var(env, "COUNTRY=%c%c", + alpha2[0], alpha2[1]); return 0; } -#else -int reg_device_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - return -ENODEV; -} -#endif /* CONFIG_HOTPLUG */ void wiphy_regulatory_register(struct wiphy *wiphy) {