[PATCH] i2c-vid.h: Support for VID to reg conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

> +static inline int vid_to_reg(int val, int vrm)
> +{
> +
> +        switch (vrm) {
> +
> +        case  0:
> +                return -1;

This one doesn't make much sense to me, as the default case will catch
it with the exact same effect anyway.

> +
> +        case 91:                /* VRM 9.1 */
> +        case 90:                /* VRM 9.0 */
> +                return ((val >= 1100) && (val <= 1850) ?
> +                        ((18500 - val * 10) / 25 + 5) / 10 : -1);
> +
> +        default:
> +                return -1;
> +
> +        }
> +}

Thanks,
-- 
Jean Delvare



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux