Re: [PATCH 1/2] usb: host: xhci: add platform driver support

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

 



On Fri, Feb 03, 2012 at 03:09:11PM +0200, Felipe Balbi wrote:
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> new file mode 100644
> index 0000000..69c4905
> --- /dev/null
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -0,0 +1,201 @@
> +/*
> + * xhci-plat.c - xHCI host controller driver platform Bus Glue.
> + *
> + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
> + * Author: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> + *
> + * A lot of code borrowed from the Linux xHCI driver.
> + */

Please specify your license.  Since you've copied from the xHCI driver,
I assume it will be GPL v2 only, but you should indicate that in your
header.  IANAL, of course. :)

This patch does not compile if you have CONFIG_USB_XHCI_PLATFORM turned
off:

sarah@xanatos:~/git/kernels/xhci$ make drivers/usb/host/xhci-hcd.ko
scripts/kconfig/conf --silentoldconfig Kconfig
make[1]: Nothing to be done for `all'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC [M]  drivers/usb/host/isp1760-hcd.o
  CC [M]  drivers/usb/host/isp1760-if.o
  CC [M]  drivers/usb/host/xhci.o
  CC [M]  drivers/usb/host/xhci-mem.o
  CC [M]  drivers/usb/host/xhci-ring.o
  CC [M]  drivers/usb/host/xhci-hub.o
  CC [M]  drivers/usb/host/xhci-dbg.o
  CC [M]  drivers/usb/host/xhci-pci.o
  LD [M]  drivers/usb/host/xhci-hcd.o
  MODPOST 820 modules
ERROR: "xhci_unregister_plat" [drivers/usb/host/xhci-hcd.ko] undefined!
ERROR: "xhci_register_plat" [drivers/usb/host/xhci-hcd.ko] undefined!
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [drivers/usb/host/xhci-hcd.ko] Error 2
sarah@xanatos:~/git/kernels/xhci$

You could do something like:

sarah@xanatos:~/git/kernels/xhci$ git diff 
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 405ea5f..65b4e2d 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1646,8 +1646,13 @@ static inline int xhci_register_pci(void) { return 0; }
 static inline void xhci_unregister_pci(void) {}
 #endif
 
+#ifdef CONFIG_USB_XHCI_PLATFORM
 int xhci_register_plat(void);
 void xhci_unregister_plat(void);
+#else
+static inline int xhci_register_plat(void) { return 0; }
+static inline void xhci_unregister_plat(void) {}
+#endif
 
 /* xHCI host controller glue */
 typedef void (*xhci_get_quirks_t)(struct device *, struct xhci_hcd *);

Please fix and resubmit.  Everything else in the patch looks great and
it looks ready to apply, aside from those two issues.

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux