Re: [PATCH 4/9] usb/gadget: add epautoconf.c to libcomposite

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

 



>>> diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
>>> index 9e85df2..689d142 100644
>>> --- a/drivers/usb/gadget/audio.c
>>> +++ b/drivers/usb/gadget/audio.c
>>> @@ -14,6 +14,7 @@
>>>   #include<linux/kernel.h>
>>>   #include<linux/utsname.h>
>>>
>>> +#include "gadget_chips.h"

> On 08/23/2012 03:25 PM, Michal Nazarewicz wrote:
>> Perhaps we should EXPORT_SYMBOL usb_gadget_controller_number() and
>> gadget_supports_altsettings() functions from epautoconf.c instead?  The
>> former does not look like it's something compiler would inline anyway.

Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> writes:
> Both are static inline. The compile hat to include this function in
> code, it has no other choice.

Right, I've misspoken.  What I meant was that the whole function is
included so there is no compile-time optimisations going on which reduce
the whole function to a single statement.

Back in the day when only UDC driver could have been compiled, the whole
gadget_chips.h file used to have tons of #ifdefs turning all but one of
gadget_is_foo() macros into zeros.  Back than it made sense to keep
usb_gadget_controller_number() as static inline in the header file since
it was reduced to a single strcmp() at compile-time, but now all the
strcmp()s are there in the code anyway.

> But you are right, the format is getting huge. I will move this
> function into composite in a later patch.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@xxxxxxxxxx>--------------ooO--(_)--Ooo--

Attachment: pgpP90AE4kAJB.pgp
Description: PGP signature


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

  Powered by Linux