staging: kpc2000_spi: eliminated duplicate initialization of drvdata local variable.
drvdata was being initialized to a particular value and then having the same value assigned to it immediately afterwards. Removed the initializer. Since the value assigned, pldev->dev.platform_data, is a pointer-to- void, removed superfluous cast. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a4965d98b4
commit
7912fd345b
|
@ -407,14 +407,14 @@ kp_spi_cleanup(struct spi_device *spidev)
|
|||
static int
|
||||
kp_spi_probe(struct platform_device *pldev)
|
||||
{
|
||||
struct kpc_core_device_platdata *drvdata = (struct kpc_core_device_platdata *)pldev->dev.platform_data;
|
||||
struct kpc_core_device_platdata *drvdata;
|
||||
struct spi_master *master = spi_alloc_master(&pldev->dev, sizeof(struct kp_spi));
|
||||
struct kp_spi *kpspi;
|
||||
struct resource *r;
|
||||
int status = 0;
|
||||
int i;
|
||||
|
||||
drvdata = (struct kpc_core_device_platdata *)pldev->dev.platform_data;
|
||||
drvdata = pldev->dev.platform_data;
|
||||
if (!drvdata){
|
||||
dev_err(&pldev->dev, "kp_spi_probe: platform_data is NULL!\n");
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in New Issue