Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755105AbbLVQTw (ORCPT ); Tue, 22 Dec 2015 11:19:52 -0500 Received: from m50-138.163.com ([123.125.50.138]:43142 "EHLO m50-138.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753332AbbLVQTv (ORCPT ); Tue, 22 Dec 2015 11:19:51 -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 3/3] staging: fbtft: use to_spi_device Date: Wed, 23 Dec 2015 00:18:43 +0800 Message-Id: <1d3f3094e366fd79d42ead835a2c5570e3c93c9a.1450800897.git.geliangtang@163.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: X-CM-TRANSID: C9GowADX7_vqd3lWP0JaAg--.5586S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gw1xAF48GFW7XF4xWFWUXFb_yoWfXrX_ur 1jvF4xWw40krn7try5KF45Aryxtrsa9rW8ta4jqan5Ja13urW5Z398Zw1DKrWDur42yrn3 ZFn5Xr15KryUKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjwL05UUUUU== X-Originating-IP: [116.77.132.150] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiGQvYmVXlQFXXDgAAsv Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1077 Lines: 29 Use to_spi_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..55a7307 100644 --- a/drivers/staging/fbtft/fbtft_device.c +++ b/drivers/staging/fbtft/fbtft_device.c @@ -1287,7 +1287,7 @@ Device 'xxx' does not have a release() function, it is broken and must be fixed static int spi_device_found(struct device *dev, void *data) { - struct spi_device *spi = container_of(dev, struct spi_device, dev); + struct spi_device *spi = to_spi_device(dev); dev_info(dev, "%s %s %dkHz %d bits mode=0x%02X\n", spi->modalias, dev_name(dev), spi->max_speed_hz / 1000, spi->bits_per_word, -- 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/