diff mbox

[1/1] usb: s3c-hsotg: Add header file protection macros in s3c-hsotg.h

Message ID 1342516210-30017-1-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat July 17, 2012, 9:10 a.m. UTC
Adds header file protection macros.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 include/linux/platform_data/s3c-hsotg.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Felipe Balbi July 17, 2012, 10:56 a.m. UTC | #1
On Tue, Jul 17, 2012 at 02:40:10PM +0530, Sachin Kamat wrote:
> Adds header file protection macros.

you need to comment if you actually ran into an issue. Is there any file
which ends up with double inclusion of this header or are you just
trying to be safe ?

> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  include/linux/platform_data/s3c-hsotg.h |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/platform_data/s3c-hsotg.h b/include/linux/platform_data/s3c-hsotg.h
> index 97ec12c..ff5892d 100644
> --- a/include/linux/platform_data/s3c-hsotg.h
> +++ b/include/linux/platform_data/s3c-hsotg.h
> @@ -12,6 +12,9 @@
>   * published by the Free Software Foundation.
>  */
>  
> +#ifndef __LINUX_USB_S3C_HSOTG_H
> +#define __LINUX_USB_S3C_HSOTG_H __FILE__

you don't need to define it to __FILE__. #define __LINUX_USB_S3C_HSOTG_H
is enough.
Sachin Kamat July 17, 2012, 11:03 a.m. UTC | #2
On 17/07/2012, Felipe Balbi <balbi@ti.com> wrote:
> On Tue, Jul 17, 2012 at 02:40:10PM +0530, Sachin Kamat wrote:
>> Adds header file protection macros.
>
> you need to comment if you actually ran into an issue. Is there any file
> which ends up with double inclusion of this header or are you just
> trying to be safe ?

Yes, it is only for safety to avoid multiple inclusion. I will update
the commit message accordingly.


>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  include/linux/platform_data/s3c-hsotg.h |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/platform_data/s3c-hsotg.h
>> b/include/linux/platform_data/s3c-hsotg.h
>> index 97ec12c..ff5892d 100644
>> --- a/include/linux/platform_data/s3c-hsotg.h
>> +++ b/include/linux/platform_data/s3c-hsotg.h
>> @@ -12,6 +12,9 @@
>>   * published by the Free Software Foundation.
>>  */
>>
>> +#ifndef __LINUX_USB_S3C_HSOTG_H
>> +#define __LINUX_USB_S3C_HSOTG_H __FILE__
>
> you don't need to define it to __FILE__. #define __LINUX_USB_S3C_HSOTG_H
> is enough.

Ok. I will re-send with the above suggestions.

>
> --
> balbi
>
Felipe Balbi July 17, 2012, 11:08 a.m. UTC | #3
On Tue, Jul 17, 2012 at 04:33:14PM +0530, Sachin Kamat wrote:
> On 17/07/2012, Felipe Balbi <balbi@ti.com> wrote:
> > On Tue, Jul 17, 2012 at 02:40:10PM +0530, Sachin Kamat wrote:
> >> Adds header file protection macros.
> >
> > you need to comment if you actually ran into an issue. Is there any file
> > which ends up with double inclusion of this header or are you just
> > trying to be safe ?
> 
> Yes, it is only for safety to avoid multiple inclusion. I will update
> the commit message accordingly.

ok thanks.
Sergei Shtylyov July 17, 2012, 12:32 p.m. UTC | #4
Hello.

On 17-07-2012 13:10, Sachin Kamat wrote:

> Adds header file protection macros.

> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>   include/linux/platform_data/s3c-hsotg.h |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)

> diff --git a/include/linux/platform_data/s3c-hsotg.h b/include/linux/platform_data/s3c-hsotg.h
> index 97ec12c..ff5892d 100644
> --- a/include/linux/platform_data/s3c-hsotg.h
> +++ b/include/linux/platform_data/s3c-hsotg.h
> @@ -12,6 +12,9 @@
>    * published by the Free Software Foundation.
>   */
>
> +#ifndef __LINUX_USB_S3C_HSOTG_H

    It's no longer in include/linux/usb/, so macro name is worth changing?

> +#define __LINUX_USB_S3C_HSOTG_H __FILE__

    __FILE__ is not needed here.

WBR, Sergei
diff mbox

Patch

diff --git a/include/linux/platform_data/s3c-hsotg.h b/include/linux/platform_data/s3c-hsotg.h
index 97ec12c..ff5892d 100644
--- a/include/linux/platform_data/s3c-hsotg.h
+++ b/include/linux/platform_data/s3c-hsotg.h
@@ -12,6 +12,9 @@ 
  * published by the Free Software Foundation.
 */
 
+#ifndef __LINUX_USB_S3C_HSOTG_H
+#define __LINUX_USB_S3C_HSOTG_H __FILE__
+
 enum s3c_hsotg_dmamode {
 	S3C_HSOTG_DMA_NONE,	/* do not use DMA at-all */
 	S3C_HSOTG_DMA_ONLY,	/* always use DMA */
@@ -33,3 +36,5 @@  struct s3c_hsotg_plat {
 };
 
 extern void s3c_hsotg_set_platdata(struct s3c_hsotg_plat *pd);
+
+#endif /* __LINUX_USB_S3C_HSOTG_H */