[i2c] [PATCH] gpio: max732x: add support for MAX7319, MAX7320-7327 I2C Port Expanders

eric miao eric.y.miao at gmail.com
Fri Jul 11 11:39:50 CEST 2008


>
> Oh, and one more thing as I just notice it:
>
>> +static inline int is_group_a(struct max732x_chip *chip, unsigned off)
>> +{
>> +     return (1u << off) & chip->mask_group_a;
>> +}
>
> Given the way you use it, can't you just define this function as:
>
> static inline int is_group_a(struct max732x_chip *chip, unsigned off)
> {
>        return (off < 8);
> }
>
> ? As this is the only place where you use chip->mask_group_a, you would
> be able to get rid of it.
>

I want to get rid of it either but I'm afraid not. (off < 8) doesn't necessarily
mean it's in group_a, max7320 is an exception.

> --
> Jean Delvare
>



-- 
Cheers
- eric



More information about the i2c mailing list