Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83080a14 authored by Geliang Tang's avatar Geliang Tang Committed by Mark Brown
Browse files

regulator: core: use dev_to_rdev



Use dev_to_rdev() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;