Re: [PATCH 4/8] usb: xhci: pci: Only create Intel mux device when it's needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 31, 2018 at 5:21 PM Heikki Krogerus
<heikki.krogerus@xxxxxxxxxxxxxxx> wrote:
>
> Only create thre Intel role mux device if the platform has
> USB peripheral controller PCI device.
>
> While here, enable the role mux on Apollo Lake platforms.

> +static int xhci_pci_board_has_udc(void)
> +{
> +       struct pci_dev *udc = pci_get_class(PCI_CLASS_SERIAL_USB_DEVICE, NULL);
> +
> +       if (udc) {
> +               pci_dev_put(udc);
> +               return true;
> +       }
> +       return false;
> +}

Looks like a code duplication with patch 3. Does it make sense to have
this in some header (usb.h?)?

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux