[PATCH 15/23] pcmcia: simplify pccard_validate_cis
Larry Finger
Larry.Finger at lwfinger.net
Mon Jul 14 11:39:23 EDT 2008
Dominik Brodowski wrote:
> As cisinfo_t only contains one unsigned_int, pccard_validate_cis can
> be simplified by passing that around directly.
>
> Signed-off-by: Dominik Brodowski <linux at dominikbrodowski.net>
The following hunk breaks ide-cs for me.
> diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
> index 3637953..0996ca2 100644
> --- a/drivers/pcmcia/cistpl.c
> +++ b/drivers/pcmcia/cistpl.c
> @@ -1490,11 +1491,13 @@ int pccard_validate_cis(struct pcmcia_socket *s, unsigned int function, cisinfo_
> ((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
> reserved++;
> }
> - if ((info->Chains == MAX_TUPLES) || (reserved > 5) ||
> - ((!dev_ok || !ident_ok) && (info->Chains > 10)))
> - info->Chains = 0;
> + if ((count) || (reserved > 5) ||
^^^^^
If this is 'count == MAX_TUPLES' rather than 'count', then it works.
> + ((!dev_ok || !ident_ok) && (count > 10)))
> + count = 0;
>
> done:
> + if (info)
> + *info = count;
> kfree(tuple);
> kfree(p);
> return CS_SUCCESS;
Larry
More information about the linux-pcmcia
mailing list