.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for Richtek RT9455WSC battery charger. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Intel Corporation |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | 6 | */ |
---|
16 | 7 | |
---|
17 | 8 | #include <linux/module.h> |
---|
.. | .. |
---|
1593 | 1584 | static int rt9455_probe(struct i2c_client *client, |
---|
1594 | 1585 | const struct i2c_device_id *id) |
---|
1595 | 1586 | { |
---|
1596 | | - struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); |
---|
| 1587 | + struct i2c_adapter *adapter = client->adapter; |
---|
1597 | 1588 | struct device *dev = &client->dev; |
---|
1598 | 1589 | struct rt9455_info *info; |
---|
1599 | 1590 | struct power_supply_config rt9455_charger_config = {}; |
---|
.. | .. |
---|
1740 | 1731 | }; |
---|
1741 | 1732 | MODULE_DEVICE_TABLE(of, rt9455_of_match); |
---|
1742 | 1733 | |
---|
| 1734 | +#ifdef CONFIG_ACPI |
---|
1743 | 1735 | static const struct acpi_device_id rt9455_i2c_acpi_match[] = { |
---|
1744 | 1736 | { "RT945500", 0 }, |
---|
1745 | 1737 | { } |
---|
1746 | 1738 | }; |
---|
1747 | 1739 | MODULE_DEVICE_TABLE(acpi, rt9455_i2c_acpi_match); |
---|
| 1740 | +#endif |
---|
1748 | 1741 | |
---|
1749 | 1742 | static struct i2c_driver rt9455_driver = { |
---|
1750 | 1743 | .probe = rt9455_probe, |
---|