1
0
Fork 0

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>
steinar/wifi_calib_4_9_kernel
Geliang Tang 2015-12-27 21:15:45 +08:00 committed by Olof Johansson
parent f929efb065
commit 48b9b6d469
1 changed files with 1 additions and 2 deletions

View File

@ -412,8 +412,7 @@ static umode_t cros_ec_lightbar_attrs_are_visible(struct kobject *kobj,
struct device *dev = container_of(kobj, struct device, kobj);
struct cros_ec_dev *ec = container_of(dev,
struct cros_ec_dev, class_dev);
struct platform_device *pdev = container_of(ec->dev,
struct platform_device, dev);
struct platform_device *pdev = to_platform_device(ec->dev);
if (pdev->id != 0)
return 0;