From patchwork Thu Jul 21 19:43:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 997022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6LJhokU030139 for ; Thu, 21 Jul 2011 19:43:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188Ab1GUTnt (ORCPT ); Thu, 21 Jul 2011 15:43:49 -0400 Received: from mtaout01-winn.ispmail.ntl.com ([81.103.221.47]:49721 "EHLO mtaout01-winn.ispmail.ntl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753050Ab1GUTns (ORCPT ); Thu, 21 Jul 2011 15:43:48 -0400 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110721194346.KLQP10265.mtaout01-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com>; Thu, 21 Jul 2011 20:43:46 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout01-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110721194346.YMVD20122.aamtaout01-winn.ispmail.ntl.com@zog.reactivated.net>; Thu, 21 Jul 2011 20:43:46 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id 9DDC99D401C; Thu, 21 Jul 2011 20:43:44 +0100 (BST) From: Daniel Drake To: linville@tuxdriver.com To: dcbw@redhat.com Cc: linux-wireless@vger.kernel.org Cc: libertas-dev@lists.infradead.org Subject: [PATCH] libertas_usb: use USB interface as parent device Message-Id: <20110721194344.9DDC99D401C@zog.reactivated.net> Date: Thu, 21 Jul 2011 20:43:44 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=7u63Sm-TJO0A:10 a=vJ1w_8FsMGIA:10 a=Op-mwl0xAAAA:8 a=yEfywBzXWxHb3ntF_HgA:9 a=d4CUUju0HPYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 21 Jul 2011 19:43:50 +0000 (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 Acked-by: Dan Williams --- 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;