summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-05 15:07:55 +0100
committerMark Brown <broonie@kernel.org>2016-01-05 15:20:50 +0100
commit83080a140874b6860b5191b375cfdad267eaa107 (patch)
treee7b5f2111d3a2989f4f3c9f7ac22b7740ebae1a0 /drivers/regulator
parentLinux 4.4-rc1 (diff)
downloadlinux-83080a140874b6860b5191b375cfdad267eaa107.tar.xz
linux-83080a140874b6860b5191b375cfdad267eaa107.zip
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;