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

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

 



________________________________________
From: Sergei Shtylyov [sshtylyov@xxxxxxxxxx]
Sent: Wednesday, March 17, 2010 5:17 PM
To: Viral Mehta
Cc: linux-usb@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] avoid multiple inclusions of file in gadget driver

Hello.

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 can also include them separately.
>
> 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.
>
> Signed-off-by: Viral Mehta <viral.mehta@xxxxxxxxxxxxxxx>
> ---
> This is against 2.6.34-rc1
> Let me know in case if any error while applying, I will resend.
>
> diff -Nurp linux-2.6.34-rc1.org/drivers/usb/gadget/composite.c linux-2.6.34-rc1/drivers/usb/gadget/composite.c
> --- linux-2.6.34-rc1.org/drivers/usb/gadget/composite.c 2010-03-16 14:04:31.000000000 -0400
> +++ linux-2.6.34-rc1/drivers/usb/gadget/composite.c     2010-03-16 14:07:09.000000000 -0400
> @@ -18,6 +18,9 @@
>   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
>   */
>
> +#ifndef __COMPOSITE__C
> +#define __COMPOSITE__C
>

>   Why double underscore before C in this file but not in other files?

Thanks for __so__ close review. Well, it was just like that even I didn't notice that.
Anyway, I will remove it if in case the patch stands good to be applied.

Thanks,
Viral Mehta

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