Re: [PATCH] bcm43xx: do not rebuild when kernel version changes

From: Michael Buesch
Date: Sat Mar 03 2007 - 15:22:55 EST


On Saturday 03 March 2007 20:03, Sam Ravnborg wrote:
> Replacing use of UTS_RELEASE with utsname()->release
> avoids that this module is rebuild each
> time the kernel version changes.
>
> Compile tested only.

I vote to get rid of the whole bcm43xx_ethtool.c file, as it's useless.
It will vanish with the advent of d80211, anyway.
Larry?

> Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
> ---
> diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c b/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
> index c947025..d2df6a0 100644
> --- a/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
> +++ b/drivers/net/wireless/bcm43xx/bcm43xx_ethtool.c
> @@ -32,7 +32,7 @@
> #include <linux/netdevice.h>
> #include <linux/pci.h>
> #include <linux/string.h>
> -#include <linux/utsrelease.h>
> +#include <linux/utsname.h>
>
>
> static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
> @@ -40,7 +40,7 @@ static void bcm43xx_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *
> struct bcm43xx_private *bcm = bcm43xx_priv(dev);
>
> strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
> - strncpy(info->version, UTS_RELEASE, sizeof(info->version));
> + strncpy(info->version, utsname()->release, sizeof(info->version));
> strncpy(info->bus_info, pci_name(bcm->pci_dev), ETHTOOL_BUSINFO_LEN);
> }
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>

--
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/