linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW
       [not found] <20170609090314.13991-1-gregkh@linuxfoundation.org>
@ 2017-06-09  9:03 ` Greg Kroah-Hartman
  2017-06-09  9:25   ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-06-09  9:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Stanislav Yakovlev, Kalle Valo,
	linux-wireless, netdev

We are trying to get rid of DRIVER_ATTR(), and the ipw2x00 driver's
attributes can be trivially changed to use DRIVER_ATTR_RW().

Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: <linux-wireless@vger.kernel.org>
Cc: <netdev@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/intel/ipw2x00/ipw2100.c | 8 +++-----
 drivers/net/wireless/intel/ipw2x00/ipw2200.c | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index f922859acf40..aaaca4d08e2b 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -4160,12 +4160,12 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
 static DEVICE_ATTR(bssinfo, S_IRUGO, show_bssinfo, NULL);
 
 #ifdef CONFIG_IPW2100_DEBUG
-static ssize_t show_debug_level(struct device_driver *d, char *buf)
+static ssize_t debug_level_show(struct device_driver *d, char *buf)
 {
 	return sprintf(buf, "0x%08X\n", ipw2100_debug_level);
 }
 
-static ssize_t store_debug_level(struct device_driver *d,
+static ssize_t debug_level_store(struct device_driver *d,
 				 const char *buf, size_t count)
 {
 	u32 val;
@@ -4179,9 +4179,7 @@ static ssize_t store_debug_level(struct device_driver *d,
 
 	return strnlen(buf, count);
 }
-
-static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO, show_debug_level,
-		   store_debug_level);
+static DRIVER_ATTR_RW(debug_level);
 #endif				/* CONFIG_IPW2100_DEBUG */
 
 static ssize_t show_fatal_error(struct device *d,
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index bbc579b647b6..5b79e2ec3a16 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -1195,12 +1195,12 @@ static void ipw_led_shutdown(struct ipw_priv *priv)
  *
  * See the level definitions in ipw for details.
  */
-static ssize_t show_debug_level(struct device_driver *d, char *buf)
+static ssize_t debug_level_show(struct device_driver *d, char *buf)
 {
 	return sprintf(buf, "0x%08X\n", ipw_debug_level);
 }
 
-static ssize_t store_debug_level(struct device_driver *d, const char *buf,
+static ssize_t debug_level_store(struct device_driver *d, const char *buf,
 				 size_t count)
 {
 	char *p = (char *)buf;
@@ -1221,9 +1221,7 @@ static ssize_t store_debug_level(struct device_driver *d, const char *buf,
 
 	return strnlen(buf, count);
 }
-
-static DRIVER_ATTR(debug_level, S_IWUSR | S_IRUGO,
-		   show_debug_level, store_debug_level);
+static DRIVER_ATTR_RW(debug_level);
 
 static inline u32 ipw_get_event_log_len(struct ipw_priv *priv)
 {
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW
  2017-06-09  9:03 ` [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
@ 2017-06-09  9:25   ` Kalle Valo
  2017-06-09  9:34     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2017-06-09  9:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Stanislav Yakovlev, linux-wireless, netdev

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> We are trying to get rid of DRIVER_ATTR(), and the ipw2x00 driver's
> attributes can be trivially changed to use DRIVER_ATTR_RW().
>
> Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> Cc: Kalle Valo <kvalo@codeaurora.org>
> Cc: <linux-wireless@vger.kernel.org>
> Cc: <netdev@vger.kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Looks good to me. I assume that I should take this, but let me know if
you are planning to push this via your trees instead. Either way is fine
for me, I'm not expecting any conflicts here.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW
  2017-06-09  9:25   ` Kalle Valo
@ 2017-06-09  9:34     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-06-09  9:34 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-kernel, Stanislav Yakovlev, linux-wireless, netdev

On Fri, Jun 09, 2017 at 12:25:44PM +0300, Kalle Valo wrote:
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> 
> > We are trying to get rid of DRIVER_ATTR(), and the ipw2x00 driver's
> > attributes can be trivially changed to use DRIVER_ATTR_RW().
> >
> > Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
> > Cc: Kalle Valo <kvalo@codeaurora.org>
> > Cc: <linux-wireless@vger.kernel.org>
> > Cc: <netdev@vger.kernel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Looks good to me. I assume that I should take this, but let me know if
> you are planning to push this via your trees instead. Either way is fine
> for me, I'm not expecting any conflicts here.

I can take it, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-09  9:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20170609090314.13991-1-gregkh@linuxfoundation.org>
2017-06-09  9:03 ` [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
2017-06-09  9:25   ` Kalle Valo
2017-06-09  9:34     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).