[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1405201020060.1176-100000@iolanthe.rowland.org>
Date: Tue, 20 May 2014 10:21:34 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
cc: balbi@...com, <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
<joe@...ches.com>, <auttamchandani@...icube.com>
Subject: Re: [PATCH 2/9] usb: gadget: net2280: Dont use magic numbers
On Mon, 19 May 2014, Ricardo Ribalda Delgado wrote:
> Instead of using magic numbers use #defines
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
> ---
> drivers/usb/gadget/net2280.c | 68 +++++++++++++++++++++++---------------------
> drivers/usb/gadget/net2280.h | 1 +
> 2 files changed, 36 insertions(+), 33 deletions(-)
>
> diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
> index 8112d91..ba1fdd8 100644
> --- a/drivers/usb/gadget/net2280.c
> +++ b/drivers/usb/gadget/net2280.c
> @@ -152,7 +152,7 @@ static inline void enable_pciirqenb(struct net2280_ep *ep)
> {
> u32 tmp = readl(&ep->dev->regs->pciirqenb0);
>
> - if (ep->dev->pdev->vendor == 0x17cc)
> + if (ep->dev->pdev->vendor == PCI_VENDOR_ID_PLX_LEGACY)
You ought to be able to make this considerably smaller by using a
quirk flag in ep->dev. The flag can indicate whether or not the
controller uses the LEGACY interface.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists