Skip to content

Commit

Permalink
regulator: core: use dev_to_rdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geliang Tang authored and Mark Brown committed Jan 5, 2016
1 parent 8005c49 commit 83080a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 83080a1

Please sign in to comment.