Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: spi_s3c24xx must initialize bus_num

Pass the bus number we expect the S3C24XX SPI driver to attach to via the
platform data.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ben Dooks and committed by
Linus Torvalds
50f426b5 4bb5eba0

+7 -6
+7 -6
drivers/spi/spi_s3c24xx.c
··· 238 238 239 239 static int __init s3c24xx_spi_probe(struct platform_device *pdev) 240 240 { 241 + struct s3c2410_spi_info *pdata; 241 242 struct s3c24xx_spi *hw; 242 243 struct spi_master *master; 243 244 struct resource *res; ··· 255 254 memset(hw, 0, sizeof(struct s3c24xx_spi)); 256 255 257 256 hw->master = spi_master_get(master); 258 - hw->pdata = pdev->dev.platform_data; 257 + hw->pdata = pdata = pdev->dev.platform_data; 259 258 hw->dev = &pdev->dev; 260 259 261 - if (hw->pdata == NULL) { 260 + if (pdata == NULL) { 262 261 dev_err(&pdev->dev, "No platform data supplied\n"); 263 262 err = -ENOENT; 264 263 goto err_no_pdata; ··· 334 333 335 334 /* setup any gpio we can */ 336 335 337 - if (!hw->pdata->set_cs) { 336 + if (!pdata->set_cs) { 338 337 hw->set_cs = s3c24xx_spi_gpiocs; 339 338 340 - s3c2410_gpio_setpin(hw->pdata->pin_cs, 1); 341 - s3c2410_gpio_cfgpin(hw->pdata->pin_cs, S3C2410_GPIO_OUTPUT); 339 + s3c2410_gpio_setpin(pdata->pin_cs, 1); 340 + s3c2410_gpio_cfgpin(pdata->pin_cs, S3C2410_GPIO_OUTPUT); 342 341 } else 343 - hw->set_cs = hw->pdata->set_cs; 342 + hw->set_cs = pdata->set_cs; 344 343 345 344 /* register our spi controller */ 346 345