File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
include/linux/platform_data Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -186,17 +186,17 @@ static int mlxreg_hotplug_attr_init(struct mlxreg_hotplug_priv_data *priv)
186186static int mlxreg_hotplug_device_create (struct device * dev ,
187187 struct mlxreg_hotplug_device * item )
188188{
189- item -> adapter = i2c_get_adapter (item -> bus );
189+ item -> adapter = i2c_get_adapter (item -> nr );
190190 if (!item -> adapter ) {
191191 dev_err (dev , "Failed to get adapter for bus %d\n" ,
192- item -> bus );
192+ item -> nr );
193193 return - EFAULT ;
194194 }
195195
196196 item -> client = i2c_new_device (item -> adapter , & item -> brdinfo );
197197 if (!item -> client ) {
198198 dev_err (dev , "Failed to create client %s at bus %d at addr 0x%02x\n" ,
199- item -> brdinfo .type , item -> bus , item -> brdinfo .addr );
199+ item -> brdinfo .type , item -> nr , item -> brdinfo .addr );
200200 i2c_put_adapter (item -> adapter );
201201 item -> adapter = NULL ;
202202 return - EFAULT ;
Original file line number Diff line number Diff line change @@ -141,41 +141,41 @@ static struct i2c_mux_reg_platform_data mlxplat_mux_data[] = {
141141static struct mlxreg_hotplug_device mlxplat_mlxcpld_psu [] = {
142142 {
143143 .brdinfo = { I2C_BOARD_INFO ("24c02" , 0x51 ) },
144- .bus = 10 ,
144+ .nr = 10 ,
145145 },
146146 {
147147 .brdinfo = { I2C_BOARD_INFO ("24c02" , 0x50 ) },
148- .bus = 10 ,
148+ .nr = 10 ,
149149 },
150150};
151151
152152static struct mlxreg_hotplug_device mlxplat_mlxcpld_pwr [] = {
153153 {
154154 .brdinfo = { I2C_BOARD_INFO ("dps460" , 0x59 ) },
155- .bus = 10 ,
155+ .nr = 10 ,
156156 },
157157 {
158158 .brdinfo = { I2C_BOARD_INFO ("dps460" , 0x58 ) },
159- .bus = 10 ,
159+ .nr = 10 ,
160160 },
161161};
162162
163163static struct mlxreg_hotplug_device mlxplat_mlxcpld_fan [] = {
164164 {
165165 .brdinfo = { I2C_BOARD_INFO ("24c32" , 0x50 ) },
166- .bus = 11 ,
166+ .nr = 11 ,
167167 },
168168 {
169169 .brdinfo = { I2C_BOARD_INFO ("24c32" , 0x50 ) },
170- .bus = 12 ,
170+ .nr = 12 ,
171171 },
172172 {
173173 .brdinfo = { I2C_BOARD_INFO ("24c32" , 0x50 ) },
174- .bus = 13 ,
174+ .nr = 13 ,
175175 },
176176 {
177177 .brdinfo = { I2C_BOARD_INFO ("24c32" , 0x50 ) },
178- .bus = 14 ,
178+ .nr = 14 ,
179179 },
180180};
181181
Original file line number Diff line number Diff line change 3939 * @adapter: I2C device adapter;
4040 * @client: I2C device client;
4141 * @brdinfo: device board information;
42- * @bus : I2C bus, where device is attached;
42+ * @nr : I2C device adapter number, to which device is to be attached;
4343 *
4444 * Structure represents I2C hotplug device static data (board topology) and
4545 * dynamic data (related kernel objects handles).
@@ -48,7 +48,7 @@ struct mlxreg_hotplug_device {
4848 struct i2c_adapter * adapter ;
4949 struct i2c_client * client ;
5050 struct i2c_board_info brdinfo ;
51- u16 bus ;
51+ int nr ;
5252};
5353
5454/**
You can’t perform that action at this time.
0 commit comments