summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-05 22:07:55 +0800
committerMark Brown <broonie@kernel.org>2016-01-05 14:20:50 +0000
commit83080a140874b6860b5191b375cfdad267eaa107 (patch)
treee7b5f2111d3a2989f4f3c9f7ac22b7740ebae1a0 /drivers/regulator
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
regulator: core: use dev_to_rdev
Use dev_to_rdev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 73b7683355cd..0853a80bf7fe 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3708,7 +3708,7 @@ static umode_t regulator_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int idx)
{
struct device *dev = kobj_to_dev(kobj);
- struct regulator_dev *rdev = container_of(dev, struct regulator_dev, dev);
+ struct regulator_dev *rdev = dev_to_rdev(dev);
const struct regulator_ops *ops = rdev->desc->ops;
umode_t mode = attr->mode;