From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756162AbbCRX0l (ORCPT ); Wed, 18 Mar 2015 19:26:41 -0400 Received: from cpsmtpb-ews02.kpnxchange.com ([213.75.39.5]:58733 "EHLO cpsmtpb-ews02.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752362AbbCRX0i (ORCPT ); Wed, 18 Mar 2015 19:26:38 -0400 Message-ID: <1426721195.2375.10.camel@x220> Subject: Re: [PATCHv2 01/12] usb: add bus type for USB ULPI From: Paul Bolle To: Heikki Krogerus Cc: Felipe Balbi , Greg Kroah-Hartman , David Cohen , Stephen Boyd , Baolu Lu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 19 Mar 2015 00:26:35 +0100 In-Reply-To: <1426682433-133813-2-git-send-email-heikki.krogerus@linux.intel.com> References: <1426682433-133813-1-git-send-email-heikki.krogerus@linux.intel.com> <1426682433-133813-2-git-send-email-heikki.krogerus@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Mar 2015 23:26:35.0698 (UTC) FILETIME=[F9E00920:01D061D2] X-RcptDomain: vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-03-18 at 14:40 +0200, Heikki Krogerus wrote: > --- a/drivers/usb/common/Makefile > +++ b/drivers/usb/common/Makefile > @@ -7,3 +7,4 @@ usb-common-y += common.o > usb-common-$(CONFIG_USB_LED_TRIG) += led.o > > obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o > +obj-$(CONFIG_USB_ULPI_BUS) += ulpi.o USB_ULPI_BUS is added as a bool symbol (see below). So ulpi.o will never be part of a module. > --- /dev/null > +++ b/drivers/usb/common/ulpi.c > +#include So is this include needed? > +static int __init ulpi_init(void) > +{ > + return bus_register(&ulpi_bus); > +} > +module_init(ulpi_init); This will be equivalent to __initcall(ulpi_init) according to include/linux/init.h. > +static void __exit ulpi_exit(void) > +{ > + bus_unregister(&ulpi_bus); > +} > +module_exit(ulpi_exit); This will never be called. > +MODULE_AUTHOR("Intel Corporation"); > +MODULE_LICENSE("GPL v2"); > +MODULE_DESCRIPTION("USB ULPI PHY bus"); And these three macros will be, effectively, preprocessed away. > --- a/drivers/usb/core/Kconfig > +++ b/drivers/usb/core/Kconfig > +config USB_ULPI_BUS > + bool "USB ULPI PHY interface support" > + depends on USB || USB_GADGET > + help > + Say yes if you have ULPI PHY attached to your USB controller. > + > + If unsure, say N. > + Paul Bolle