From: Geliang Tang Date: Sun, 27 Dec 2015 13:15:46 +0000 (+0800) Subject: staging: fbtft: use to_platform_device() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f6bfc25ee0f60aa6ada33b3948a9aa3aecc6ef6a;p=openwrt%2Fstaging%2Fblogic.git staging: fbtft: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 08d0597ced5b..241d7c6bebde 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1330,7 +1330,7 @@ static void pr_spi_devices(void) static int p_device_found(struct device *dev, void *data) { struct platform_device - *pdev = container_of(dev, struct platform_device, dev); + *pdev = to_platform_device(dev); if (strstr(pdev->name, "fb")) dev_info(dev, "%s id=%d pdata? %s\n", pdev->name, pdev->id,