Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932133AbbL0NSo (ORCPT ); Sun, 27 Dec 2015 08:18:44 -0500 Received: from m50-132.163.com ([123.125.50.132]:54860 "EHLO m50-132.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295AbbL0NSl (ORCPT ); Sun, 27 Dec 2015 08:18:41 -0500 From: Geliang Tang To: Thomas Petazzoni , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Greg Kroah-Hartman Cc: Geliang Tang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/10] staging: fbtft: use to_platform_device() Date: Sun, 27 Dec 2015 21:15:46 +0800 Message-Id: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: X-CM-TRANSID: DNGowED50UzF5H9WNOwfAA--.4922S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gw1xAF48GFW7XF4xCFyfWFg_yoW3Cwb_ur 4jva1xWr48Kr1ktry5KF15ZFySqana9rWktFy8t395Xa13u3y5u3yDZw1Dtw4DurW7Aryf Zw1kGr4Ygr13GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU1YZX7UUUUU== X-Originating-IP: [116.77.145.148] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiowbdmVUL3n2oagAAse Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 994 Lines: 29 Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/staging/fbtft/fbtft_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft_device.c b/drivers/staging/fbtft/fbtft_device.c index 071f79b..50d5735 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1305,7 +1305,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, -- 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/