aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_s3c24xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/spi_s3c24xx.c')
-rw-r--r--drivers/spi/spi_s3c24xx.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 6f2c79da984d..80719ef54365 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -238,6 +238,7 @@ static irqreturn_t s3c24xx_spi_irq(int irq, void *dev)
238 238
239static int __init s3c24xx_spi_probe(struct platform_device *pdev) 239static int __init s3c24xx_spi_probe(struct platform_device *pdev)
240{ 240{
241 struct s3c2410_spi_info *pdata;
241 struct s3c24xx_spi *hw; 242 struct s3c24xx_spi *hw;
242 struct spi_master *master; 243 struct spi_master *master;
243 struct resource *res; 244 struct resource *res;
@@ -254,10 +255,10 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
254 memset(hw, 0, sizeof(struct s3c24xx_spi)); 255 memset(hw, 0, sizeof(struct s3c24xx_spi));
255 256
256 hw->master = spi_master_get(master); 257 hw->master = spi_master_get(master);
257 hw->pdata = pdev->dev.platform_data; 258 hw->pdata = pdata = pdev->dev.platform_data;
258 hw->dev = &pdev->dev; 259 hw->dev = &pdev->dev;
259 260
260 if (hw->pdata == NULL) { 261 if (pdata == NULL) {
261 dev_err(&pdev->dev, "No platform data supplied\n"); 262 dev_err(&pdev->dev, "No platform data supplied\n");
262 err = -ENOENT; 263 err = -ENOENT;
263 goto err_no_pdata; 264 goto err_no_pdata;
@@ -333,13 +334,13 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev)
333 334
334 /* setup any gpio we can */ 335 /* setup any gpio we can */
335 336
336 if (!hw->pdata->set_cs) { 337 if (!pdata->set_cs) {
337 hw->set_cs = s3c24xx_spi_gpiocs; 338 hw->set_cs = s3c24xx_spi_gpiocs;
338 339
339 s3c2410_gpio_setpin(hw->pdata->pin_cs, 1); 340 s3c2410_gpio_setpin(pdata->pin_cs, 1);
340 s3c2410_gpio_cfgpin(hw->pdata->pin_cs, S3C2410_GPIO_OUTPUT); 341 s3c2410_gpio_cfgpin(pdata->pin_cs, S3C2410_GPIO_OUTPUT);
341 } else 342 } else
342 hw->set_cs = hw->pdata->set_cs; 343 hw->set_cs = pdata->set_cs;
343 344
344 /* register our spi controller */ 345 /* register our spi controller */
345 346