hwmon: (pc87360) Fix device resource declaration
commitfdb6630db5d70cf82556a655704dc1ec9459be2c
authorJean Delvare <khali@linux-fr.org>
Sat, 14 Aug 2010 19:08:48 +0000 (14 21:08 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Aug 2010 23:41:40 +0000 (26 16:41 -0700)
tree15319ae592936fcddf8898a205bc3b19df44dbf6
parentba998f347b374291208f264661be30426c149939
hwmon: (pc87360) Fix device resource declaration

commit b9783dcebe952bf73449fe70a19ee4814adc81a0 upstream.

It's not OK to call platform_device_add_resources() multiple times
in a row. Despite its name, this functions sets the resources, it
doesn't add them. So we have to prepare an array with all the
resources, and then call platform_device_add_resources() once.

Before this fix, only the last I/O resource would be actually
registered. The other I/O resources were leaked.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/pc87360.c