hwmon: (zl6100) Maintain delay parameter in driver instance data
authorGuenter Roeck <linux@roeck-us.net>
Wed, 7 Mar 2012 11:58:55 +0000 (03:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 19:31:40 +0000 (12:31 -0700)
commit139e7860c91207f954a87149a8d64eddbbd73bd8
tree2e778eeb6bb96b7284799b66d5c1a1e58fe6f58e
parentdabd9c99a0eb990e88aee8660272179f8d21d1fa
hwmon: (zl6100) Maintain delay parameter in driver instance data

commit 7ad6307ad6968ce25cecf209d4822d4c722be030 upstream.

A global delay parameter has the side effect of being overwritten with 0 if a
single ZL2004 or ZL6105 is instantiated. If other chips supported by the same
driver are in the system, this will result in access errors for those chips.

To solve the problem, keep a per-instance copy of the delay parameter, and do
not change the original parameter.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/pmbus/zl6100.c