Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754769AbbL0NR7 (ORCPT ); Sun, 27 Dec 2015 08:17:59 -0500 Received: from m50-133.163.com ([123.125.50.133]:55461 "EHLO m50-133.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754707AbbL0NR5 (ORCPT ); Sun, 27 Dec 2015 08:17:57 -0500 From: Geliang Tang To: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Ulf Hansson Cc: Geliang Tang , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/10] mmc: cb710: use to_platform_device() Date: Sun, 27 Dec 2015 21:15:43 +0800 Message-Id: X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: X-CM-TRANSID: DdGowEA5I1S35H9WM5OJAA--.5494S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gw1xAF48GFWfKFyxXFyUtrb_yoW3Zrb_Cr yjqrsFgr1xZr9YqF48Kr1Svry5ta4qvrWkXw1xKrWYvry3Xr18Zay0vrsrZr1ruF18Caya k3srWr13Ar9rJjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbDPEPUUUUU== X-Originating-IP: [116.77.145.148] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiowXdmVUL3n2m+AABsA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 995 Lines: 30 Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/mmc/host/cb710-mmc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mmc/host/cb710-mmc.h b/drivers/mmc/host/cb710-mmc.h index 8984ec8..8ecd9e5 100644 --- a/drivers/mmc/host/cb710-mmc.h +++ b/drivers/mmc/host/cb710-mmc.h @@ -29,8 +29,7 @@ static inline struct mmc_host *cb710_slot_to_mmc(struct cb710_slot *slot) static inline struct cb710_slot *cb710_mmc_to_slot(struct mmc_host *mmc) { - struct platform_device *pdev = container_of(mmc_dev(mmc), - struct platform_device, dev); + struct platform_device *pdev = to_platform_device(mmc_dev(mmc)); return cb710_pdev_to_slot(pdev); } -- 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/