Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1301552
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] regulator: core: use dev_to_rdev |
| Date | 2016-01-05 15:10 +0100 |
| Message-ID | <qNAte-3SF-27@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Use dev_to_rdev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6653b1b..3308c6b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3710,7 +3710,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;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] regulator: core: use dev_to_rdev Geliang Tang <geliangtang@163.com> - 2016-01-05 15:10 +0100 Applied "regulator: core: use dev_to_rdev" to the regulator tree Mark Brown <broonie@kernel.org> - 2016-01-05 19:00 +0100
csiph-web