Skip to content

Commit

Permalink
ipmi:ssif: Use i2c_adapter_id instead of adapter->nr
Browse files Browse the repository at this point in the history
Signed-off-by: Corey Minyard <cminyard@mvista.com>
  • Loading branch information
cminyard committed Jun 16, 2017
1 parent 1adc910 commit be8647d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/char/ipmi/ipmi_ssif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ static int inc_usecount(void *send_info)
{
struct ssif_info *ssif_info = send_info;

if (!i2c_get_adapter(ssif_info->client->adapter->nr))
if (!i2c_get_adapter(i2c_adapter_id(ssif_info->client->adapter)))
return -ENODEV;

i2c_use_client(ssif_info->client);
Expand Down Expand Up @@ -1665,7 +1665,8 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
unsigned int thread_num;

thread_num = ((ssif_info->client->adapter->nr << 8) |
thread_num = ((i2c_adapter_id(ssif_info->client->adapter)
<< 8) |
ssif_info->client->addr);
init_completion(&ssif_info->wake_thread);
ssif_info->thread = kthread_run(ipmi_ssif_thread, ssif_info,
Expand Down

0 comments on commit be8647d

Please sign in to comment.