RE: [RFC][PATCH] avoid multiple inclusions of file in gadget driver

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

 



Hi,

-----Original Message-----
From: Greg KH [mailto:greg@xxxxxxxxx]
Sent: Tuesday, March 16, 2010 7:12 PM
To: Viral Mehta
Cc: linux-usb@xxxxxxxxxxxxxxx
Subject: Re: [RFC][PATCH] avoid multiple inclusions of file in gadget driver

On Tue, Mar 16, 2010 at 03:35:15PM +0530, Viral Mehta wrote:
> Avoid multiple inclusions.
> Guard composite.c, config.c, epautoconf.c,
> and ubstring.c from being included for multiple times.
>
> For e.g.,
> g_audio driver already includes these files
> g_video gadget driver which may be used for Video
> surveillance will also include them
>
> Now, if g_webcam is a simple union of g_audio and g_video,
> it will get a compilation error for redefinition of symbols without this patch.

> Do we get an error with the existing in-kernel drivers somehow without
> this patch?

No, we do not get an error with in-kernel drivers but with a mixture of in-kernel and non-kernel, yes.

g_audio is already in-kernel and I am using g_video/g_webcam from here,
http://www.spinics.net/lists/linux-media/msg10212.html

This was submitted as RFC by Laurent. He sent below 3 patches,
[PATCH 1/3] USB gadget: audio class function driver
[PATCH 2/3] USB gadget: video class function driver
[PATCH 3/3] USB gadget: Webcam Audio/Video device

Now, since I want webcam gadget driver to be mainlined,
the best way to carry forward the task is to take g_audio which is already there in kernel and was submitted by Bryan
and use g_video and g_webcam which was earlier submitted by Laurent.

I believe that g_audio and g_video can live separately and so both of them may separately include these files.
As well as some gadget (webcam) may want both the functionalities and so may also combine them as done in above mentioned patch 3.

As of now, Laurent is waiting for some v4l2 events patches to be mainlined and
then he would submit theses patches again. And I think we will need this patch at that time.

And all above things are just not correct provided there is a better way to handle this which I am not knowing.

Thanks,
Viral Mehta

> thanks,

> greg k-h

______________________________________________________________________

This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

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