diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-05 14:07:55 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-01-05 14:20:50 (GMT) |
commit | 83080a140874b6860b5191b375cfdad267eaa107 (patch) | |
tree | e7b5f2111d3a2989f4f3c9f7ac22b7740ebae1a0 /drivers/regulator/core.c | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | linux-83080a140874b6860b5191b375cfdad267eaa107.tar.xz |
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/core.c')
-rw-r--r-- | drivers/regulator/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 73b7683..0853a80 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; |