diff options
author | Geliang Tang <geliangtang@163.com> | 2015-12-27 08:15:45 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2016-05-11 14:55:47 -0400 |
commit | 48b9b6d4699e23cda45756b6a1fe5d481ba45914 (patch) | |
tree | 730d2f800763dced4eab0a5ef6902f3e1807af6d /drivers/platform/chrome | |
parent | f929efb06578d2f9afd869911a8b4cc21b2e6e73 (diff) |
platform/chrome: use to_platform_device()
Use to_platform_device() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/platform/chrome')
-rw-r--r-- | drivers/platform/chrome/cros_ec_lightbar.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c index ff7640575c75..a79fb86e1fb9 100644 --- a/drivers/platform/chrome/cros_ec_lightbar.c +++ b/drivers/platform/chrome/cros_ec_lightbar.c | |||
@@ -412,8 +412,7 @@ static umode_t cros_ec_lightbar_attrs_are_visible(struct kobject *kobj, | |||
412 | struct device *dev = container_of(kobj, struct device, kobj); | 412 | struct device *dev = container_of(kobj, struct device, kobj); |
413 | struct cros_ec_dev *ec = container_of(dev, | 413 | struct cros_ec_dev *ec = container_of(dev, |
414 | struct cros_ec_dev, class_dev); | 414 | struct cros_ec_dev, class_dev); |
415 | struct platform_device *pdev = container_of(ec->dev, | 415 | struct platform_device *pdev = to_platform_device(ec->dev); |
416 | struct platform_device, dev); | ||
417 | if (pdev->id != 0) | 416 | if (pdev->id != 0) |
418 | return 0; | 417 | return 0; |
419 | 418 | ||