diff mbox

libertas_usb: use USB interface as parent device

Message ID 20110721194344.9DDC99D401C@zog.reactivated.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Daniel Drake July 21, 2011, 7:43 p.m. UTC
Currently, "udevadm info -a -p /sys/class/net/wlan0" doesn't mention
the usb8xxx or libertas driver anywhere. This makes writing udev rules
a bit uncomfortable.

Using the USB interface as the parent device corrects the hierarchy.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 drivers/net/wireless/libertas/if_usb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Dan Williams July 27, 2011, 7:15 p.m. UTC | #1
On Thu, 2011-07-21 at 20:43 +0100, Daniel Drake wrote:
> Currently, "udevadm info -a -p /sys/class/net/wlan0" doesn't mention
> the usb8xxx or libertas driver anywhere. This makes writing udev rules
> a bit uncomfortable.
> 
> Using the USB interface as the parent device corrects the hierarchy.
> 
> Signed-off-by: Daniel Drake <dsd@laptop.org>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  drivers/net/wireless/libertas/if_usb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
> index b5acc39..e368b29 100644
> --- a/drivers/net/wireless/libertas/if_usb.c
> +++ b/drivers/net/wireless/libertas/if_usb.c
> @@ -324,7 +324,7 @@ static int if_usb_probe(struct usb_interface *intf,
>  	}
>  	kparam_unblock_sysfs_write(fw_name);
>  
> -	if (!(priv = lbs_add_card(cardp, &udev->dev)))
> +	if (!(priv = lbs_add_card(cardp, &intf->dev)))
>  		goto err_prog_firmware;
>  
>  	cardp->priv = priv;


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index b5acc39..e368b29 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -324,7 +324,7 @@  static int if_usb_probe(struct usb_interface *intf,
 	}
 	kparam_unblock_sysfs_write(fw_name);
 
-	if (!(priv = lbs_add_card(cardp, &udev->dev)))
+	if (!(priv = lbs_add_card(cardp, &intf->dev)))
 		goto err_prog_firmware;
 
 	cardp->priv = priv;