From: Stanislaw Gruszka Remove undocumented sysfs files used for driver debugging and development. Given the age of the driver, it is highly unlikely that access to any of this information is needed, but if so, proper debugfs entries can be added. Suggested-by: Johannes Berg Signed-off-by: Stanislaw Gruszka --- .../net/wireless/intel/iwlegacy/4965-mac.c | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index dc420366dff3..621a6ccdaaa6 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c @@ -4520,74 +4520,6 @@ il4965_irq_tasklet(struct tasklet_struct *t) #endif } -/***************************************************************************** - * - * sysfs attributes - * - *****************************************************************************/ - -static ssize_t -il4965_show_temperature(struct device *d, struct device_attribute *attr, - char *buf) -{ - struct il_priv *il = dev_get_drvdata(d); - - if (!il_is_alive(il)) - return -EAGAIN; - - return sprintf(buf, "%d\n", il->temperature); -} - -static DEVICE_ATTR(temperature, 0444, il4965_show_temperature, NULL); - -static ssize_t -il4965_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) -{ - struct il_priv *il = dev_get_drvdata(d); - - if (!il_is_ready_rf(il)) - return sprintf(buf, "off\n"); - else - return sprintf(buf, "%d\n", il->tx_power_user_lmt); -} - -static ssize_t -il4965_store_tx_power(struct device *d, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct il_priv *il = dev_get_drvdata(d); - unsigned long val; - int ret; - - ret = kstrtoul(buf, 10, &val); - if (ret) - IL_INFO("%s is not in decimal form.\n", buf); - else { - mutex_lock(&il->mutex); - ret = il_set_tx_power(il, val, false); - mutex_unlock(&il->mutex); - if (ret) - IL_ERR("failed setting tx power (0x%08x).\n", ret); - else - ret = count; - } - return ret; -} - -static DEVICE_ATTR(tx_power, 0644, il4965_show_tx_power, - il4965_store_tx_power); - -static struct attribute *il_sysfs_entries[] = { - &dev_attr_temperature.attr, - &dev_attr_tx_power.attr, - NULL -}; - -static const struct attribute_group il_attribute_group = { - .name = NULL, /* put in device directory */ - .attrs = il_sysfs_entries, -}; - /****************************************************************************** * * uCode download functions @@ -4922,12 +4854,6 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) il_dbgfs_register(il, DRV_NAME); - err = sysfs_create_group(&il->pci_dev->dev.kobj, &il_attribute_group); - if (err) { - IL_ERR("failed to create sysfs device attributes\n"); - goto out_unbind; - } - /* We have our copies now, allow OS release its copies */ release_firmware(ucode_raw); complete(&il->_4965.firmware_loading_complete); @@ -6653,7 +6579,6 @@ il4965_pci_remove(struct pci_dev *pdev) D_INFO("*** UNLOAD DRIVER ***\n"); il_dbgfs_unregister(il); - sysfs_remove_group(&pdev->dev.kobj, &il_attribute_group); /* ieee80211_unregister_hw call wil cause il_mac_stop to * be called and il4965_down since we are removing the device -- 2.50.1