[PATCH 2/9] firmware: meson: simplify getting .driver_data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We should get 'driver_data' from 'struct device' directly. Going via
platform_device is an unneeded step back and forth.

Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---

Build tested only. buildbot is happy.

 drivers/firmware/meson/meson_sm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
index 77aa5c6398aa..714016e3aab3 100644
--- a/drivers/firmware/meson/meson_sm.c
+++ b/drivers/firmware/meson/meson_sm.c
@@ -240,12 +240,11 @@ EXPORT_SYMBOL_GPL(meson_sm_get);
 static ssize_t serial_show(struct device *dev, struct device_attribute *attr,
 			 char *buf)
 {
-	struct platform_device *pdev = to_platform_device(dev);
 	struct meson_sm_firmware *fw;
 	uint8_t *id_buf;
 	int ret;
 
-	fw = platform_get_drvdata(pdev);
+	fw = dev_get_drvdata(dev);
 
 	id_buf = kmalloc(SM_CHIP_ID_LENGTH, GFP_KERNEL);
 	if (!id_buf)
-- 
2.30.2




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux