File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,6 @@ static int palmas_i2c_probe(struct i2c_client *i2c)
511
511
int ret = 0 , i ;
512
512
unsigned int reg , addr ;
513
513
int slave ;
514
- const struct of_device_id * match ;
515
514
516
515
pdata = dev_get_platdata (& i2c -> dev );
517
516
@@ -535,12 +534,7 @@ static int palmas_i2c_probe(struct i2c_client *i2c)
535
534
palmas -> dev = & i2c -> dev ;
536
535
palmas -> irq = i2c -> irq ;
537
536
538
- match = of_match_device (of_palmas_match_tbl , & i2c -> dev );
539
-
540
- if (!match )
541
- return - ENODATA ;
542
-
543
- driver_data = (struct palmas_driver_data * )match -> data ;
537
+ driver_data = (struct palmas_driver_data * ) device_get_match_data (& i2c -> dev );
544
538
palmas -> features = * driver_data -> features ;
545
539
546
540
for (i = 0 ; i < PALMAS_NUM_CLIENTS ; i ++ ) {
You can’t perform that action at this time.
0 commit comments