Re: [PATCH v4] hwmon: (applesmc) Introduce a register lookup table

From: Henrik Rydberg
Date: Wed Nov 10 2010 - 17:49:09 EST


On 11/10/2010 11:47 PM, Guenter Roeck wrote:

> From: Henrik Rydberg <rydberg@xxxxxxxxxxx>
>
> One main problem with the current driver is the inability to quickly
> search for supported keys, resulting in detailed feature maps per
> machine model which are cumbersome to maintain.
>
> This patch adds a register lookup table, which enables binary search
> for supported keys. The lookup also reduces the io frequency, so the
> original mutex is replaced by locks around the actual io.
>
> Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
> [guenter.roeck@xxxxxxxxxxxx: Added value range check to key_at_index_store()]
> Signed-off-by: Guenter Roeck <guenter.roeck@xxxxxxxxxxxx>
> ---
> Patch as applied, with added value range check to applesmc_key_at_index_store().


Works nicely, much obliged. It's a wrap. :-)

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/