| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for SBS compliant Smart Battery System Managers |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 10 | 11 | * Datasheet LTC1760: http://cds.linear.com/docs/en/datasheet/1760fb.pdf |
|---|
| 11 | 12 | * |
|---|
| 12 | 13 | * Karl-Heinz Schneider <karl-heinz@schneider-inet.de> |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 15 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 16 | | - * published by the Free Software Foundation. |
|---|
| 17 | 14 | */ |
|---|
| 18 | 15 | |
|---|
| 19 | 16 | #include <linux/gpio.h> |
|---|
| .. | .. |
|---|
| 317 | 314 | static int sbsm_probe(struct i2c_client *client, |
|---|
| 318 | 315 | const struct i2c_device_id *id) |
|---|
| 319 | 316 | { |
|---|
| 320 | | - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
|---|
| 317 | + struct i2c_adapter *adapter = client->adapter; |
|---|
| 321 | 318 | struct sbsm_data *data; |
|---|
| 322 | 319 | struct device *dev = &client->dev; |
|---|
| 323 | 320 | struct power_supply_desc *psy_desc; |
|---|