* [PATCH] libertas: remove ifdef OLPC noise
@ 2019-01-16 15:16 Lubomir Rintel
2019-01-16 16:04 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Lubomir Rintel @ 2019-01-16 15:16 UTC (permalink / raw)
To: Kalle Valo; +Cc: libertas-dev, linux-wireless, linux-kernel, Lubomir Rintel
<asm/olpc.h> provides machine_is_olpc() stub for CONFIG_OLPC=n,
compiler should just optimize the unneeded bits away.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
drivers/net/wireless/marvell/libertas/if_usb.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
index 220dcdee8d2b..7b61c599948e 100644
--- a/drivers/net/wireless/marvell/libertas/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas/if_usb.c
@@ -12,9 +12,7 @@
#include <linux/usb.h>
#include <linux/olpc-ec.h>
-#ifdef CONFIG_OLPC
#include <asm/olpc.h>
-#endif
#define DRV_NAME "usb8xxx"
@@ -174,13 +172,11 @@ static void if_usb_fw_timeo(struct timer_list *t)
wake_up(&cardp->fw_wq);
}
-#ifdef CONFIG_OLPC
static void if_usb_reset_olpc_card(struct lbs_private *priv)
{
printk(KERN_CRIT "Resetting OLPC wireless via EC...\n");
olpc_ec_cmd(0x25, NULL, 0, NULL, 0);
}
-#endif
/**
* if_usb_probe - sets the configuration values
@@ -267,10 +263,8 @@ static int if_usb_probe(struct usb_interface *intf,
priv->exit_deep_sleep = NULL;
priv->reset_deep_sleep_wakeup = NULL;
priv->is_polling = false;
-#ifdef CONFIG_OLPC
if (machine_is_olpc())
priv->reset_card = if_usb_reset_olpc_card;
-#endif
cardp->boot2_version = udev->descriptor.bcdDevice;
@@ -395,10 +389,8 @@ static int if_usb_reset_device(struct if_usb_card *cardp)
ret = usb_reset_device(cardp->udev);
msleep(100);
-#ifdef CONFIG_OLPC
if (ret && machine_is_olpc())
if_usb_reset_olpc_card(NULL);
-#endif
return ret;
}
@@ -939,14 +931,12 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message)
goto out;
}
-#ifdef CONFIG_OLPC
if (machine_is_olpc()) {
if (priv->wol_criteria == EHS_REMOVE_WAKEUP)
olpc_ec_wakeup_clear(EC_SCI_SRC_WLAN);
else
olpc_ec_wakeup_set(EC_SCI_SRC_WLAN);
}
-#endif
ret = lbs_suspend(priv);
if (ret)
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libertas: remove ifdef OLPC noise
2019-01-16 15:16 [PATCH] libertas: remove ifdef OLPC noise Lubomir Rintel
@ 2019-01-16 16:04 ` Kalle Valo
2019-01-16 16:20 ` Lubomir Rintel
0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2019-01-16 16:04 UTC (permalink / raw)
To: Lubomir Rintel; +Cc: libertas-dev, linux-wireless, linux-kernel
Lubomir Rintel <lkundrak@v3.sk> writes:
> <asm/olpc.h> provides machine_is_olpc() stub for CONFIG_OLPC=n,
> compiler should just optimize the unneeded bits away.
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> ---
> drivers/net/wireless/marvell/libertas/if_usb.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
> index 220dcdee8d2b..7b61c599948e 100644
> --- a/drivers/net/wireless/marvell/libertas/if_usb.c
> +++ b/drivers/net/wireless/marvell/libertas/if_usb.c
> @@ -12,9 +12,7 @@
> #include <linux/usb.h>
> #include <linux/olpc-ec.h>
>
> -#ifdef CONFIG_OLPC
> #include <asm/olpc.h>
> -#endif
Using asm directory looked odd to me so I did some investigation:
$ find -name olpc.h
./arch/x86/include/asm/olpc.h
Did you build this on something else than x86? For example, will the
compiler find olpc.h when building for arm?
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libertas: remove ifdef OLPC noise
2019-01-16 16:04 ` Kalle Valo
@ 2019-01-16 16:20 ` Lubomir Rintel
0 siblings, 0 replies; 3+ messages in thread
From: Lubomir Rintel @ 2019-01-16 16:20 UTC (permalink / raw)
To: Kalle Valo; +Cc: libertas-dev, linux-wireless, linux-kernel
On Wed, 2019-01-16 at 18:04 +0200, Kalle Valo wrote:
> Lubomir Rintel <lkundrak@v3.sk> writes:
>
> > <asm/olpc.h> provides machine_is_olpc() stub for CONFIG_OLPC=n,
> > compiler should just optimize the unneeded bits away.
> >
> > Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
> > ---
> > drivers/net/wireless/marvell/libertas/if_usb.c | 10 ----------
> > 1 file changed, 10 deletions(-)
> >
> > diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
> > index 220dcdee8d2b..7b61c599948e 100644
> > --- a/drivers/net/wireless/marvell/libertas/if_usb.c
> > +++ b/drivers/net/wireless/marvell/libertas/if_usb.c
> > @@ -12,9 +12,7 @@
> > #include <linux/usb.h>
> > #include <linux/olpc-ec.h>
> >
> > -#ifdef CONFIG_OLPC
> > #include <asm/olpc.h>
> > -#endif
>
> Using asm directory looked odd to me so I did some investigation:
>
> $ find -name olpc.h
> ./arch/x86/include/asm/olpc.h
>
> Did you build this on something else than x86? For example, will the
> compiler find olpc.h when building for arm?
Uh, no. You're right, this indeed breaks on non-x86.
Perhaps olpc-ec.h should provide something that could tell whether the
EC is available that could be used instead of machine_is_olpc(), or the
olpc.h moved outside arch/x86.
For now, please just ignore the patch..
Lubo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-16 16:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 15:16 [PATCH] libertas: remove ifdef OLPC noise Lubomir Rintel
2019-01-16 16:04 ` Kalle Valo
2019-01-16 16:20 ` Lubomir Rintel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.