[RFC] pcmcia: export stored values in sysfs

Russell King rmk+pcmcia at arm.linux.org.uk
Sun Dec 11 15:35:47 EST 2005


On Sun, Dec 11, 2005 at 09:30:15PM +0100, Dominik Brodowski wrote:
> And any objections to this one?

Yes.

> diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
> index 8e33793..3546d37 100644
> --- a/drivers/pcmcia/cs.c
> +++ b/drivers/pcmcia/cs.c
> @@ -453,11 +453,11 @@ static int socket_setup(struct pcmcia_so
>  	}
>  
>  	if (status & SS_CARDBUS) {
> +		skt->state |= SOCKET_CARDBUS;
>  		if (!(skt->features & SS_CAP_CARDBUS)) {
>  			cs_err(skt, "cardbus cards are not supported.\n");
>  			return CS_BAD_TYPE;
>  		}
> -		skt->state |= SOCKET_CARDBUS;

If the card is not supported, we return an error, which will shut down
the socket.  This in turn clears skt->state to a clean state, so this
change is meaningless.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core



More information about the linux-pcmcia mailing list