Re: [PATCH 4/5] usb/gadget: don't deploy SS descriptors if SS is notenabled.

From: Michal Nazarewicz
Date: Wed Apr 13 2011 - 06:59:47 EST

On Wed, 13 Apr 2011 12:56:57 +0200, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> wrote:

Sergei Shtylyov wrote:

Hello Sergei,

Cleaned-up example:
(in header)
static inline void init_funky_net (struct net_device *d) {}
(in the code itself)
dev = alloc_etherdev (sizeof(struct funky_private));
if (!dev)
return -ENODEV;

The problem here is that the code is included via

#include "composite.c

so we don't really use header files. The alternative would be to use the
gadget_is_super_speed() function but that one takes a gadget as argument.

void usb_create_ss_descriptors(struct usb_function *f)
/* ... */
static inline void usb_create_ss_descriptors(struct usb_function *f) { }

Is usually preferred.

Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at