diff options
Diffstat (limited to 'drivers/hwmon/max1111.c')
-rw-r--r-- | drivers/hwmon/max1111.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 12c05774a1c3..bfaa665ccf32 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c | |||
@@ -66,6 +66,16 @@ static int max1111_read(struct device *dev, int channel) | |||
66 | return (v1 << 2) | (v2 >> 6); | 66 | return (v1 << 2) | (v2 >> 6); |
67 | } | 67 | } |
68 | 68 | ||
69 | #ifdef CONFIG_SHARPSL_PM | ||
70 | static struct max1111_data *the_max1111; | ||
71 | |||
72 | int max1111_read_channel(int channel) | ||
73 | { | ||
74 | return max1111_read(&the_max1111->spi->dev, channel); | ||
75 | } | ||
76 | EXPORT_SYMBOL(max1111_read_channel); | ||
77 | #endif | ||
78 | |||
69 | /* | 79 | /* |
70 | * NOTE: SPI devices do not have a default 'name' attribute, which is | 80 | * NOTE: SPI devices do not have a default 'name' attribute, which is |
71 | * likely to be used by hwmon applications to distinguish between | 81 | * likely to be used by hwmon applications to distinguish between |
@@ -181,6 +191,9 @@ static int __devinit max1111_probe(struct spi_device *spi) | |||
181 | goto err_remove; | 191 | goto err_remove; |
182 | } | 192 | } |
183 | 193 | ||
194 | #ifdef CONFIG_SHARPSL_PM | ||
195 | the_max1111 = data; | ||
196 | #endif | ||
184 | return 0; | 197 | return 0; |
185 | 198 | ||
186 | err_remove: | 199 | err_remove: |