* [PATCH] ar9170: fix for driver-core ABI change
@ 2010-03-08 23:42 Stephen Rothwell
2010-03-09 1:52 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2010-03-08 23:42 UTC (permalink / raw)
To: David Miller, netdev; +Cc: John W. Linville, LKML, linux-next
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/wireless/ath/ar9170/usb.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Hi Dave,
I have been carrying this patch in linux-next for some time as a fixup
for the driver-core tree. It is now needed in net-2.6 (i.e. my
net-current) (since you merged the wireless tree) *after* you merge with
Linus' tree i.e. the down()/up() are present in the net-2.6 tree and the
changes to the driver core to use mutexes are in Linus' tree.
diff --git a/drivers/net/wireless/ath/ar9170/usb.c b/drivers/net/wireless/ath/ar9170/usb.c
index 4e30197..7fc1034 100644
--- a/drivers/net/wireless/ath/ar9170/usb.c
+++ b/drivers/net/wireless/ath/ar9170/usb.c
@@ -41,6 +41,7 @@
#include <linux/usb.h>
#include <linux/firmware.h>
#include <linux/etherdevice.h>
+#include <linux/mutex.h>
#include <net/mac80211.h>
#include "ar9170.h"
#include "cmd.h"
@@ -726,10 +727,10 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
/* unbind anything failed */
if (parent)
- down(&parent->sem);
+ device_lock(parent);
device_release_driver(&aru->udev->dev);
if (parent)
- up(&parent->sem);
+ device_unlock(parent);
}
static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
--
1.7.0
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ar9170: fix for driver-core ABI change
2010-03-08 23:42 [PATCH] ar9170: fix for driver-core ABI change Stephen Rothwell
@ 2010-03-09 1:52 ` Stephen Rothwell
2010-03-09 18:00 ` Stefan Richter
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2010-03-09 1:52 UTC (permalink / raw)
To: David Miller, netdev; +Cc: John W. Linville, LKML, linux-next
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hi Dave,
On Tue, 9 Mar 2010 10:42:21 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> drivers/net/wireless/ath/ar9170/usb.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> I have been carrying this patch in linux-next for some time as a fixup
> for the driver-core tree. It is now needed in net-2.6 (i.e. my
> net-current) (since you merged the wireless tree) *after* you merge with
> Linus' tree i.e. the down()/up() are present in the net-2.6 tree and the
> changes to the driver core to use mutexes are in Linus' tree.
Greg tells me that the semaphore to mutex change didn't go into Linus'
tree. However, this patch can still be applied as the device_lock/unlock
primitives did go in. I guess that the include of mutex.h is not needed.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ar9170: fix for driver-core ABI change
2010-03-09 1:52 ` Stephen Rothwell
@ 2010-03-09 18:00 ` Stefan Richter
2010-03-09 22:08 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Richter @ 2010-03-09 18:00 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: David Miller, netdev, John W. Linville, LKML, linux-next
Stephen Rothwell wrote:
> Greg tells me that the semaphore to mutex change didn't go into Linus'
> tree. However, this patch can still be applied as the device_lock/unlock
> primitives did go in. I guess that the include of mutex.h is not needed.
An #include <linux/device.h> seems to be in order though. It is pulled
in via linux/usb.h and this is surely not bound to change anytime soon,
but still.
--
Stefan Richter
-=====-==-=- --== -=--=
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ar9170: fix for driver-core ABI change
2010-03-09 18:00 ` Stefan Richter
@ 2010-03-09 22:08 ` Stephen Rothwell
0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2010-03-09 22:08 UTC (permalink / raw)
To: Stefan Richter; +Cc: David Miller, netdev, John W. Linville, LKML, linux-next
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
Hi Stefan,
On Tue, 09 Mar 2010 19:00:02 +0100 Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
>
> Stephen Rothwell wrote:
> > Greg tells me that the semaphore to mutex change didn't go into Linus'
> > tree. However, this patch can still be applied as the device_lock/unlock
> > primitives did go in. I guess that the include of mutex.h is not needed.
>
> An #include <linux/device.h> seems to be in order though. It is pulled
> in via linux/usb.h and this is surely not bound to change anytime soon,
> but still.
Damn! Caught by my own "Rule #1" :-)
Thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-09 22:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 23:42 [PATCH] ar9170: fix for driver-core ABI change Stephen Rothwell
2010-03-09 1:52 ` Stephen Rothwell
2010-03-09 18:00 ` Stefan Richter
2010-03-09 22:08 ` Stephen Rothwell
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).