diff options
author | Andrew Morton <akpm@osdl.org> | 2005-06-20 17:30:35 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-27 23:37:29 -0400 |
commit | edfc43f2ec542c17c479d8ec7e4b0cee7b20f578 (patch) | |
tree | a66fcda6b17aba0cae1e13364a7c8d3bb2b2d69a /drivers/net/wireless/ipw2100.c | |
parent | 011fe95a3b25ff124486fc27dc0395904ecf5852 (diff) |
[PATCH] wireless-device-attr-fixes
Repair Jeff's stuff after gregkh depredations.
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 09cc5fdd290a..189ad7b2cec9 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -3380,7 +3380,8 @@ static void ipw2100_msg_free(struct ipw2100_priv *priv) | |||
3380 | priv->msg_buffers = NULL; | 3380 | priv->msg_buffers = NULL; |
3381 | } | 3381 | } |
3382 | 3382 | ||
3383 | static ssize_t show_pci(struct device *d, char *buf) | 3383 | static ssize_t show_pci(struct device *d, struct device_attribute *attr, |
3384 | char *buf) | ||
3384 | { | 3385 | { |
3385 | struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev); | 3386 | struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev); |
3386 | char *out = buf; | 3387 | char *out = buf; |
@@ -3400,23 +3401,26 @@ static ssize_t show_pci(struct device *d, char *buf) | |||
3400 | } | 3401 | } |
3401 | static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL); | 3402 | static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL); |
3402 | 3403 | ||
3403 | static ssize_t show_cfg(struct device *d, char *buf) | 3404 | static ssize_t show_cfg(struct device *d, struct device_attribute *attr, |
3405 | char *buf) | ||
3404 | { | 3406 | { |
3405 | struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data; | 3407 | struct ipw2100_priv *p = d->driver_data; |
3406 | return sprintf(buf, "0x%08x\n", (int)p->config); | 3408 | return sprintf(buf, "0x%08x\n", (int)p->config); |
3407 | } | 3409 | } |
3408 | static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL); | 3410 | static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL); |
3409 | 3411 | ||
3410 | static ssize_t show_status(struct device *d, char *buf) | 3412 | static ssize_t show_status(struct device *d, struct device_attribute *attr, |
3413 | char *buf) | ||
3411 | { | 3414 | { |
3412 | struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data; | 3415 | struct ipw2100_priv *p = d->driver_data; |
3413 | return sprintf(buf, "0x%08x\n", (int)p->status); | 3416 | return sprintf(buf, "0x%08x\n", (int)p->status); |
3414 | } | 3417 | } |
3415 | static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); | 3418 | static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); |
3416 | 3419 | ||
3417 | static ssize_t show_capability(struct device *d, char *buf) | 3420 | static ssize_t show_capability(struct device *d, struct device_attribute *attr, |
3421 | char *buf) | ||
3418 | { | 3422 | { |
3419 | struct ipw2100_priv *p = (struct ipw2100_priv *)d->driver_data; | 3423 | struct ipw2100_priv *p = d->driver_data; |
3420 | return sprintf(buf, "0x%08x\n", (int)p->capability); | 3424 | return sprintf(buf, "0x%08x\n", (int)p->capability); |
3421 | } | 3425 | } |
3422 | static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL); | 3426 | static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL); |
@@ -3599,7 +3603,8 @@ const struct { | |||
3599 | }; | 3603 | }; |
3600 | 3604 | ||
3601 | 3605 | ||
3602 | static ssize_t show_registers(struct device *d, char *buf) | 3606 | static ssize_t show_registers(struct device *d, struct device_attribute *attr, |
3607 | char *buf) | ||
3603 | { | 3608 | { |
3604 | int i; | 3609 | int i; |
3605 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3610 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
@@ -3620,7 +3625,8 @@ static ssize_t show_registers(struct device *d, char *buf) | |||
3620 | static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL); | 3625 | static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL); |
3621 | 3626 | ||
3622 | 3627 | ||
3623 | static ssize_t show_hardware(struct device *d, char *buf) | 3628 | static ssize_t show_hardware(struct device *d, struct device_attribute *attr, |
3629 | char *buf) | ||
3624 | { | 3630 | { |
3625 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3631 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3626 | struct net_device *dev = priv->net_dev; | 3632 | struct net_device *dev = priv->net_dev; |
@@ -3660,7 +3666,8 @@ static ssize_t show_hardware(struct device *d, char *buf) | |||
3660 | static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL); | 3666 | static DEVICE_ATTR(hardware, S_IRUGO, show_hardware, NULL); |
3661 | 3667 | ||
3662 | 3668 | ||
3663 | static ssize_t show_memory(struct device *d, char *buf) | 3669 | static ssize_t show_memory(struct device *d, struct device_attribute *attr, |
3670 | char *buf) | ||
3664 | { | 3671 | { |
3665 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3672 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3666 | struct net_device *dev = priv->net_dev; | 3673 | struct net_device *dev = priv->net_dev; |
@@ -3713,7 +3720,8 @@ static ssize_t show_memory(struct device *d, char *buf) | |||
3713 | return len; | 3720 | return len; |
3714 | } | 3721 | } |
3715 | 3722 | ||
3716 | static ssize_t store_memory(struct device *d, const char *buf, size_t count) | 3723 | static ssize_t store_memory(struct device *d, struct device_attribute *attr, |
3724 | const char *buf, size_t count) | ||
3717 | { | 3725 | { |
3718 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3726 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3719 | struct net_device *dev = priv->net_dev; | 3727 | struct net_device *dev = priv->net_dev; |
@@ -3749,7 +3757,8 @@ static ssize_t store_memory(struct device *d, const char *buf, size_t count) | |||
3749 | static DEVICE_ATTR(memory, S_IWUSR|S_IRUGO, show_memory, store_memory); | 3757 | static DEVICE_ATTR(memory, S_IWUSR|S_IRUGO, show_memory, store_memory); |
3750 | 3758 | ||
3751 | 3759 | ||
3752 | static ssize_t show_ordinals(struct device *d, char *buf) | 3760 | static ssize_t show_ordinals(struct device *d, struct device_attribute *attr, |
3761 | char *buf) | ||
3753 | { | 3762 | { |
3754 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3763 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3755 | u32 val = 0; | 3764 | u32 val = 0; |
@@ -3783,7 +3792,8 @@ static ssize_t show_ordinals(struct device *d, char *buf) | |||
3783 | static DEVICE_ATTR(ordinals, S_IRUGO, show_ordinals, NULL); | 3792 | static DEVICE_ATTR(ordinals, S_IRUGO, show_ordinals, NULL); |
3784 | 3793 | ||
3785 | 3794 | ||
3786 | static ssize_t show_stats(struct device *d, char *buf) | 3795 | static ssize_t show_stats(struct device *d, struct device_attribute *attr, |
3796 | char *buf) | ||
3787 | { | 3797 | { |
3788 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3798 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3789 | char * out = buf; | 3799 | char * out = buf; |
@@ -3848,7 +3858,8 @@ int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode) | |||
3848 | return 0; | 3858 | return 0; |
3849 | } | 3859 | } |
3850 | 3860 | ||
3851 | static ssize_t show_internals(struct device *d, char *buf) | 3861 | static ssize_t show_internals(struct device *d, struct device_attribute *attr, |
3862 | char *buf) | ||
3852 | { | 3863 | { |
3853 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3864 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3854 | int len = 0; | 3865 | int len = 0; |
@@ -3899,7 +3910,8 @@ static ssize_t show_internals(struct device *d, char *buf) | |||
3899 | static DEVICE_ATTR(internals, S_IRUGO, show_internals, NULL); | 3910 | static DEVICE_ATTR(internals, S_IRUGO, show_internals, NULL); |
3900 | 3911 | ||
3901 | 3912 | ||
3902 | static ssize_t show_bssinfo(struct device *d, char *buf) | 3913 | static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr, |
3914 | char *buf) | ||
3903 | { | 3915 | { |
3904 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3916 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3905 | char essid[IW_ESSID_MAX_SIZE + 1]; | 3917 | char essid[IW_ESSID_MAX_SIZE + 1]; |
@@ -3942,8 +3954,6 @@ static ssize_t show_bssinfo(struct device *d, char *buf) | |||
3942 | static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL); | 3954 | static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL); |
3943 | 3955 | ||
3944 | 3956 | ||
3945 | |||
3946 | |||
3947 | #ifdef CONFIG_IPW_DEBUG | 3957 | #ifdef CONFIG_IPW_DEBUG |
3948 | static ssize_t show_debug_level(struct device_driver *d, char *buf) | 3958 | static ssize_t show_debug_level(struct device_driver *d, char *buf) |
3949 | { | 3959 | { |
@@ -3976,7 +3986,8 @@ static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, show_debug_level, | |||
3976 | #endif /* CONFIG_IPW_DEBUG */ | 3986 | #endif /* CONFIG_IPW_DEBUG */ |
3977 | 3987 | ||
3978 | 3988 | ||
3979 | static ssize_t show_fatal_error(struct device *d, char *buf) | 3989 | static ssize_t show_fatal_error(struct device *d, |
3990 | struct device_attribute *attr, char *buf) | ||
3980 | { | 3991 | { |
3981 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 3992 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
3982 | char *out = buf; | 3993 | char *out = buf; |
@@ -4001,8 +4012,8 @@ static ssize_t show_fatal_error(struct device *d, char *buf) | |||
4001 | return out - buf; | 4012 | return out - buf; |
4002 | } | 4013 | } |
4003 | 4014 | ||
4004 | static ssize_t store_fatal_error(struct device *d, const char *buf, | 4015 | static ssize_t store_fatal_error(struct device *d, |
4005 | size_t count) | 4016 | struct device_attribute *attr, const char *buf, size_t count) |
4006 | { | 4017 | { |
4007 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 4018 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
4008 | schedule_reset(priv); | 4019 | schedule_reset(priv); |
@@ -4011,13 +4022,15 @@ static ssize_t store_fatal_error(struct device *d, const char *buf, | |||
4011 | static DEVICE_ATTR(fatal_error, S_IWUSR|S_IRUGO, show_fatal_error, store_fatal_error); | 4022 | static DEVICE_ATTR(fatal_error, S_IWUSR|S_IRUGO, show_fatal_error, store_fatal_error); |
4012 | 4023 | ||
4013 | 4024 | ||
4014 | static ssize_t show_scan_age(struct device *d, char *buf) | 4025 | static ssize_t show_scan_age(struct device *d, struct device_attribute *attr, |
4026 | char *buf) | ||
4015 | { | 4027 | { |
4016 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 4028 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
4017 | return sprintf(buf, "%d\n", priv->ieee->scan_age); | 4029 | return sprintf(buf, "%d\n", priv->ieee->scan_age); |
4018 | } | 4030 | } |
4019 | 4031 | ||
4020 | static ssize_t store_scan_age(struct device *d, const char *buf, size_t count) | 4032 | static ssize_t store_scan_age(struct device *d, struct device_attribute *attr, |
4033 | const char *buf, size_t count) | ||
4021 | { | 4034 | { |
4022 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 4035 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
4023 | struct net_device *dev = priv->net_dev; | 4036 | struct net_device *dev = priv->net_dev; |
@@ -4053,7 +4066,8 @@ static ssize_t store_scan_age(struct device *d, const char *buf, size_t count) | |||
4053 | static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age); | 4066 | static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age); |
4054 | 4067 | ||
4055 | 4068 | ||
4056 | static ssize_t show_rf_kill(struct device *d, char *buf) | 4069 | static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr, |
4070 | char *buf) | ||
4057 | { | 4071 | { |
4058 | /* 0 - RF kill not enabled | 4072 | /* 0 - RF kill not enabled |
4059 | 1 - SW based RF kill active (sysfs) | 4073 | 1 - SW based RF kill active (sysfs) |
@@ -4097,7 +4111,8 @@ static int ipw_radio_kill_sw(struct ipw2100_priv *priv, int disable_radio) | |||
4097 | return 1; | 4111 | return 1; |
4098 | } | 4112 | } |
4099 | 4113 | ||
4100 | static ssize_t store_rf_kill(struct device *d, const char *buf, size_t count) | 4114 | static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr, |
4115 | const char *buf, size_t count) | ||
4101 | { | 4116 | { |
4102 | struct ipw2100_priv *priv = dev_get_drvdata(d); | 4117 | struct ipw2100_priv *priv = dev_get_drvdata(d); |
4103 | ipw_radio_kill_sw(priv, buf[0] == '1'); | 4118 | ipw_radio_kill_sw(priv, buf[0] == '1'); |