projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8005c49
)
regulator: core: use dev_to_rdev
author
Geliang Tang
<geliangtang@163.com>
Tue, 5 Jan 2016 14:07:55 +0000
(22:07 +0800)
committer
Mark Brown
<broonie@kernel.org>
Tue, 5 Jan 2016 14:20:50 +0000
(14:20 +0000)
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>
drivers/regulator/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 73b7683355cd015791114249defc26fdf2b644cf..0853a80bf7fea191b7ed4bb17f3048aec63e0adf 100644
(file)
--- 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;