Re: [PATCH] staging/wlags49_hs: Fix build error when CONFIG_SYSFS is not set

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

 



On Fri, 2010-06-11 at 02:35 -0400, Javier Martinez Canillas wrote:
> With current linux-next I got a build error with wlags49_h2 driver when CONFIG_SYSFS is not set.
> diff --git a/drivers/staging/wlags49_h2/wl_sysfs.h b/drivers/staging/wlags49_h2/wl_sysfs.h
> index 6d96d03..7d5895d 100644
> --- a/drivers/staging/wlags49_h2/wl_sysfs.h
> +++ b/drivers/staging/wlags49_h2/wl_sysfs.h
> @@ -2,6 +2,6 @@
>  extern void register_wlags_sysfs(struct net_device *);
>  extern void unregister_wlags_sysfs(struct net_device *);
>  #else
> -static void register_wlags_sysfs(struct net_device *) { return; };
> -static void unregister_wlags_sysfs(struct net_device *) { return; };
> +#define register_wlags_sysfs(net_device) { }
> +#define unregister_wlags_sysfs(net_device) { }
>  #endif

Yes, that works, but a better fix would be to remove the
semicolons after the function close braces.
---
diff --git a/drivers/staging/wlags49_h2/wl_sysfs.h
b/drivers/staging/wlags49_h2/wl_sysfs.h
index 6d96d03..7d5895d 100644
--- a/drivers/staging/wlags49_h2/wl_sysfs.h
+++ b/drivers/staging/wlags49_h2/wl_sysfs.h
@@ -2,6 +2,6 @@
 extern void register_wlags_sysfs(struct net_device *);
 extern void unregister_wlags_sysfs(struct net_device *);
 #else
-static void register_wlags_sysfs(struct net_device *) { return; };
-static void unregister_wlags_sysfs(struct net_device *) { return; };
+static void register_wlags_sysfs(struct net_device *) { return; }
+static void unregister_wlags_sysfs(struct net_device *) { return; }
 #endif


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux