aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/ucb1x00-assabet.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-09-25 02:03:03 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:06 -0800
commit0c55445f201841bfd6c658c47df8311b6722f002 (patch)
tree68b02474461eea74e0fd54c5858a433b6aa942ab /drivers/mfd/ucb1x00-assabet.c
parent68db2bc98cc1594a1cc487755aff4340fd4f1611 (diff)
MCP_UCB1200: Convert from class_device to device
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mfd/ucb1x00-assabet.c')
-rw-r--r--drivers/mfd/ucb1x00-assabet.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
index e325fa71f38..b7c8e781386 100644
--- a/drivers/mfd/ucb1x00-assabet.c
+++ b/drivers/mfd/ucb1x00-assabet.c
@@ -20,7 +20,8 @@
#include "ucb1x00.h"
#define UCB1X00_ATTR(name,input)\
-static ssize_t name##_show(struct class_device *dev, char *buf) \
+static ssize_t name##_show(struct device *dev, struct device_attribute *attr,
+ char *buf) \
{ \
struct ucb1x00 *ucb = classdev_to_ucb1x00(dev); \
int val; \
@@ -29,7 +30,7 @@ static ssize_t name##_show(struct class_device *dev, char *buf) \
ucb1x00_adc_disable(ucb); \
return sprintf(buf, "%d\n", val); \
} \
-static CLASS_DEVICE_ATTR(name,0444,name##_show,NULL)
+static DEVICE_ATTR(name,0444,name##_show,NULL)
UCB1X00_ATTR(vbatt, UCB_ADC_INP_AD1);
UCB1X00_ATTR(vcharger, UCB_ADC_INP_AD0);
@@ -37,17 +38,17 @@ UCB1X00_ATTR(batt_temp, UCB_ADC_INP_AD2);
static int ucb1x00_assabet_add(struct ucb1x00_dev *dev)
{
- class_device_create_file(&dev->ucb->cdev, &class_device_attr_vbatt);
- class_device_create_file(&dev->ucb->cdev, &class_device_attr_vcharger);
- class_device_create_file(&dev->ucb->cdev, &class_device_attr_batt_temp);
+ device_create_file(&dev->ucb->dev, &device_attr_vbatt);
+ device_create_file(&dev->ucb->dev, &device_attr_vcharger);
+ device_create_file(&dev->ucb->dev, &device_attr_batt_temp);
return 0;
}
static void ucb1x00_assabet_remove(struct ucb1x00_dev *dev)
{
- class_device_remove_file(&dev->ucb->cdev, &class_device_attr_batt_temp);
- class_device_remove_file(&dev->ucb->cdev, &class_device_attr_vcharger);
- class_device_remove_file(&dev->ucb->cdev, &class_device_attr_vbatt);
+ device_remove_file(&dev->ucb->cdev, &device_attr_batt_temp);
+ device_remove_file(&dev->ucb->cdev, &device_attr_vcharger);
+ device_remove_file(&dev->ucb->cdev, &device_attr_vbatt);
}
static struct ucb1x00_driver ucb1x00_assabet_driver = {