File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ static int mpq7932_probe(struct i2c_client *client)
105
105
return - ENOMEM ;
106
106
107
107
info = & data -> info ;
108
- info -> pages = MPQ7932_NUM_PAGES ;
108
+ info -> pages = ( int )( unsigned long ) device_get_match_data ( & client -> dev ) ;
109
109
info -> format [PSC_VOLTAGE_OUT ] = direct ;
110
110
info -> m [PSC_VOLTAGE_OUT ] = 160 ;
111
111
info -> b [PSC_VOLTAGE_OUT ] = -33 ;
@@ -115,7 +115,7 @@ static int mpq7932_probe(struct i2c_client *client)
115
115
}
116
116
117
117
#if IS_ENABLED (CONFIG_SENSORS_MPQ7932_REGULATOR )
118
- info -> num_regulators = ARRAY_SIZE ( mpq7932_regulators_desc ) ;
118
+ info -> num_regulators = info -> pages ;
119
119
info -> reg_desc = mpq7932_regulators_desc ;
120
120
#endif
121
121
@@ -129,7 +129,7 @@ static int mpq7932_probe(struct i2c_client *client)
129
129
}
130
130
131
131
static const struct of_device_id mpq7932_of_match [] = {
132
- { .compatible = "mps,mpq7932" },
132
+ { .compatible = "mps,mpq7932" , . data = ( void * ) MPQ7932_NUM_PAGES },
133
133
{},
134
134
};
135
135
MODULE_DEVICE_TABLE (of , mpq7932_of_match );
You can’t perform that action at this time.
0 commit comments