RE: [RFCv4 PATCH 13/13] usb: gadget: ufg: add Mass Storage Gadget adapter to UFG

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

 



On Thursday, November 22, 2012 11:00 PM Michal Nazarewicz wrote:

<snip>

> 
> > +
> > +#define UFG_MODULE	(UFG_SUBSYSTEM->subsys.su_group.cg_item.ci_type-
> >ct_owner)
> 
> I cannot seem to find UFG_SUBSYSTEM anywhere.
> 

Because it is not here... It is exported from the usb_functions.c.
That's also why it is written in capital letters - to indicate
that there is something unusual about it. Maybe I could use

__ufg_subsytem instead?

Maybe not so elegant, but in order to programmatically operate on
configfs I need to have a configfs subsystem accessible in the
adapter modules. This way seemed the easiest. Providing some API
in usb_functions.c for the sake of adapters is probably not good
since the new gadget framework should not be aware that there are any
adapters at all. Even though in fact this _is_ a kind of API,
it is easily removed when time comes to remove the adapters,
which is the ultimate goal.

<snip>

> > +
> > +/*
> > + * ATTENTION:
> > + *
> > + * struct configfs_dirent is "borrowed" from
> fs/configfs/configfs_internal.h.
> 
> Could we just include it?  It sounds like a better idea to me.

I could have done it. Why not? I thought that using something
"internal" is not good. On the other hand in fact I do use it
and there is the "Stable internal API nonsense" plus the
adapters are temporary by their nature. In the next version
I can include it just as well.


Andrzej


--
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