@@ -3576,7 +3576,8 @@ static int spi_nor_create_write_dirmap(struct spi_nor *nor)
3576
3576
static int spi_nor_probe (struct spi_mem * spimem )
3577
3577
{
3578
3578
struct spi_device * spi = spimem -> spi ;
3579
- struct flash_platform_data * data = dev_get_platdata (& spi -> dev );
3579
+ struct device * dev = & spi -> dev ;
3580
+ struct flash_platform_data * data = dev_get_platdata (dev );
3580
3581
struct spi_nor * nor ;
3581
3582
/*
3582
3583
* Enable all caps by default. The core will mask them after
@@ -3586,13 +3587,13 @@ static int spi_nor_probe(struct spi_mem *spimem)
3586
3587
char * flash_name ;
3587
3588
int ret ;
3588
3589
3589
- nor = devm_kzalloc (& spi -> dev , sizeof (* nor ), GFP_KERNEL );
3590
+ nor = devm_kzalloc (dev , sizeof (* nor ), GFP_KERNEL );
3590
3591
if (!nor )
3591
3592
return - ENOMEM ;
3592
3593
3593
3594
nor -> spimem = spimem ;
3594
- nor -> dev = & spi -> dev ;
3595
- spi_nor_set_flash_node (nor , spi -> dev . of_node );
3595
+ nor -> dev = dev ;
3596
+ spi_nor_set_flash_node (nor , dev -> of_node );
3596
3597
3597
3598
spi_mem_set_drvdata (spimem , nor );
3598
3599
@@ -3628,9 +3629,8 @@ static int spi_nor_probe(struct spi_mem *spimem)
3628
3629
*/
3629
3630
if (nor -> params -> page_size > PAGE_SIZE ) {
3630
3631
nor -> bouncebuf_size = nor -> params -> page_size ;
3631
- devm_kfree (nor -> dev , nor -> bouncebuf );
3632
- nor -> bouncebuf = devm_kmalloc (nor -> dev ,
3633
- nor -> bouncebuf_size ,
3632
+ devm_kfree (dev , nor -> bouncebuf );
3633
+ nor -> bouncebuf = devm_kmalloc (dev , nor -> bouncebuf_size ,
3634
3634
GFP_KERNEL );
3635
3635
if (!nor -> bouncebuf )
3636
3636
return - ENOMEM ;
0 commit comments