From mboxrd@z Thu Jan 1 00:00:00 1970 From: broonie@opensource.wolfsonmicro.com (Mark Brown) Date: Sun, 20 May 2012 10:21:13 +0100 Subject: [PATCH v2 4/6] ARM: Samsung: Modify s3c64xx_spi{0|1|2}_set_platdata function In-Reply-To: <1337333613-6216-5-git-send-email-thomas.abraham@linaro.org> References: <1337333613-6216-1-git-send-email-thomas.abraham@linaro.org> <1337333613-6216-5-git-send-email-thomas.abraham@linaro.org> Message-ID: <20120520092113.GA20652@opensource.wolfsonmicro.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, May 18, 2012 at 03:03:31PM +0530, Thomas Abraham wrote: > - s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1); > + s3c64xx_spi0_set_platdata("s3c6410-spi", NULL, 0, 1); ... > + pd.src_clk_nr = src_clk_nr; > + pd.cfg_gpio = (cfg_gpio) ? cfg_gpio : s3c64xx_spi0_cfg_gpio; > + s3c64xx_device_spi0.name = dev_name; This looks *really* strange. Why do we need to pass in a name to set in s3c64xx_device_spi0's name, why would we want to use a different name? This dev_name also isn't equivalent to dev_name() which makes matters more confusing than they need to be. There was similar code for the I2C controllers which caused some really hard to debug brittleness. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: