[PATCH] libertas: provide reset_card() callback on OLPC

Holger Schurig hs4233 at mail.mn-solutions.de
Wed May 21 03:18:39 EDT 2008


> +#ifdef CONFIG_OLPC
> +	if (machine_is_olpc())
> +		priv->reset_card = if_usb_reset_olpc_card;
> +#endif


If you have in some header:

#ifndef CONFIG_OLPC
#define if_usb_reset_olpc_card (0)
#define machine_is_olpc() (0)
#endif

Then you should be able to write

   if (machine_is_olpc())
         priv->reset_card = if_usb_reset_olpc_card;

without any more ulgy #ifdef's.


> +		if_usb_reset_olpc_card(NULL);

Why do you call this function with priv==NULL, when 
if_usb_reset_olpc_card() doesn't even use NULL, err, " struct 
lbs_private *priv" in if_usb_reset_olpc_card() ?!?!



More information about the libertas-dev mailing list