From 36476be350d52fdc1ddf09e7e91e06eafa29141e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 21 Jan 2009 14:08:40 +0000 Subject: [PATCH] --- yaml --- r: 140246 b: refs/heads/master c: 1fa9ad52b07811ebf258f3f6907de8dbf020ec2d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/regulator/core.c | 27 ---------------------- trunk/include/linux/regulator/driver.h | 32 ++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/[refs] b/[refs] index 4cbbb50e5ba2..ef9c423d2a49 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fefdae42465facfa26d41a7f0010f1ade32c3386 +refs/heads/master: 1fa9ad52b07811ebf258f3f6907de8dbf020ec2d diff --git a/trunk/drivers/regulator/core.c b/trunk/drivers/regulator/core.c index f17362ac9c61..0ed13c2a8c3c 100644 --- a/trunk/drivers/regulator/core.c +++ b/trunk/drivers/regulator/core.c @@ -29,33 +29,6 @@ static DEFINE_MUTEX(regulator_list_mutex); static LIST_HEAD(regulator_list); static LIST_HEAD(regulator_map_list); -/* - * struct regulator_dev - * - * Voltage / Current regulator class device. One for each regulator. - */ -struct regulator_dev { - struct regulator_desc *desc; - int use_count; - - /* lists we belong to */ - struct list_head list; /* list of all regulators */ - struct list_head slist; /* list of supplied regulators */ - - /* lists we own */ - struct list_head consumer_list; /* consumers we supply */ - struct list_head supply_list; /* regulators we supply */ - - struct blocking_notifier_head notifier; - struct mutex mutex; /* consumer lock */ - struct module *owner; - struct device dev; - struct regulation_constraints *constraints; - struct regulator_dev *supply; /* for tree */ - - void *reg_data; /* regulator_dev data */ -}; - /* * struct regulator_map * diff --git a/trunk/include/linux/regulator/driver.h b/trunk/include/linux/regulator/driver.h index 2254ad93b784..c263e36e564e 100644 --- a/trunk/include/linux/regulator/driver.h +++ b/trunk/include/linux/regulator/driver.h @@ -137,6 +137,38 @@ struct regulator_desc { struct module *owner; }; +/* + * struct regulator_dev + * + * Voltage / Current regulator class device. One for each + * regulator. + * + * This should *not* be used directly by anything except the regulator + * core and notification injection (which should take the mutex and do + * no other direct access). + */ +struct regulator_dev { + struct regulator_desc *desc; + int use_count; + + /* lists we belong to */ + struct list_head list; /* list of all regulators */ + struct list_head slist; /* list of supplied regulators */ + + /* lists we own */ + struct list_head consumer_list; /* consumers we supply */ + struct list_head supply_list; /* regulators we supply */ + + struct blocking_notifier_head notifier; + struct mutex mutex; /* consumer lock */ + struct module *owner; + struct device dev; + struct regulation_constraints *constraints; + struct regulator_dev *supply; /* for tree */ + + void *reg_data; /* regulator_dev data */ +}; + struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, struct device *dev, struct regulator_init_data *init_data, void *driver_data);