@@ -1429,16 +1429,17 @@ static int cy8c95x0_detect(struct i2c_client *client,
1429
1429
1430
1430
static int cy8c95x0_probe (struct i2c_client * client )
1431
1431
{
1432
+ struct device * dev = & client -> dev ;
1432
1433
struct cy8c95x0_pinctrl * chip ;
1433
1434
struct regmap_config regmap_conf ;
1434
1435
struct regmap_range_cfg regmap_range_conf ;
1435
1436
int ret ;
1436
1437
1437
- chip = devm_kzalloc (& client -> dev , sizeof (* chip ), GFP_KERNEL );
1438
+ chip = devm_kzalloc (dev , sizeof (* chip ), GFP_KERNEL );
1438
1439
if (!chip )
1439
1440
return - ENOMEM ;
1440
1441
1441
- chip -> dev = & client -> dev ;
1442
+ chip -> dev = dev ;
1442
1443
1443
1444
/* Set the device type */
1444
1445
chip -> driver_data = (uintptr_t )i2c_get_match_data (client );
@@ -1467,14 +1468,14 @@ static int cy8c95x0_probe(struct i2c_client *client)
1467
1468
return - ENODEV ;
1468
1469
}
1469
1470
1470
- ret = devm_regulator_get_enable (& client -> dev , "vdd" );
1471
+ ret = devm_regulator_get_enable (dev , "vdd" );
1471
1472
if (ret )
1472
- return dev_err_probe (& client -> dev , ret , "failed to enable regulator vdd\n" );
1473
+ return dev_err_probe (dev , ret , "failed to enable regulator vdd\n" );
1473
1474
1474
1475
/* bring the chip out of reset if reset pin is provided */
1475
- chip -> gpio_reset = devm_gpiod_get_optional (& client -> dev , "reset" , GPIOD_OUT_HIGH );
1476
+ chip -> gpio_reset = devm_gpiod_get_optional (dev , "reset" , GPIOD_OUT_HIGH );
1476
1477
if (IS_ERR (chip -> gpio_reset ))
1477
- return dev_err_probe (chip -> dev , PTR_ERR (chip -> gpio_reset ), "Failed to get GPIO 'reset'\n" );
1478
+ return dev_err_probe (dev , PTR_ERR (chip -> gpio_reset ), "Failed to get GPIO 'reset'\n" );
1478
1479
gpiod_set_consumer_name (chip -> gpio_reset , "CY8C95X0 RESET" );
1479
1480
if (chip -> gpio_reset ) {
1480
1481
fsleep (1000 );
0 commit comments