On Mon, 19 May 2014, Ricardo Ribalda Delgado wrote:

> Instead of using magic numbers use #defines
> 
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.riba...@gmail.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-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to