hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/power/supply/rt9455_charger.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Richtek RT9455WSC battery charger.
34 *
45 * 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.
156 */
167
178 #include <linux/module.h>
....@@ -1593,7 +1584,7 @@
15931584 static int rt9455_probe(struct i2c_client *client,
15941585 const struct i2c_device_id *id)
15951586 {
1596
- struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
1587
+ struct i2c_adapter *adapter = client->adapter;
15971588 struct device *dev = &client->dev;
15981589 struct rt9455_info *info;
15991590 struct power_supply_config rt9455_charger_config = {};
....@@ -1740,11 +1731,13 @@
17401731 };
17411732 MODULE_DEVICE_TABLE(of, rt9455_of_match);
17421733
1734
+#ifdef CONFIG_ACPI
17431735 static const struct acpi_device_id rt9455_i2c_acpi_match[] = {
17441736 { "RT945500", 0 },
17451737 { }
17461738 };
17471739 MODULE_DEVICE_TABLE(acpi, rt9455_i2c_acpi_match);
1740
+#endif
17481741
17491742 static struct i2c_driver rt9455_driver = {
17501743 .probe = rt9455_probe,