From 2f7c68cb55ecb7331f2381deb497c27155f32faf Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 03 Jan 2024 09:43:39 +0000 Subject: [PATCH] update kernel to 5.10.198 --- kernel/drivers/hwmon/smm665.c | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/kernel/drivers/hwmon/smm665.c b/kernel/drivers/hwmon/smm665.c index 627c9c3..b6cbe98 100644 --- a/kernel/drivers/hwmon/smm665.c +++ b/kernel/drivers/hwmon/smm665.c @@ -1,11 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Driver for SMM665 Power Controller / Monitor * * Copyright (C) 2010 Ericsson AB. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. * * This driver should also work for SMM465, SMM764, and SMM766, but is untested * for those chips. Only monitoring functionality is implemented. @@ -200,7 +197,7 @@ if (rv != -ENXIO) { /* * We expect ENXIO to reflect NACK - * (per Documentation/i2c/fault-codes). + * (per Documentation/i2c/fault-codes.rst). * Everything else is an error. */ dev_dbg(&client->dev, @@ -565,8 +562,9 @@ ATTRIBUTE_GROUPS(smm665); -static int smm665_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static const struct i2c_device_id smm665_id[]; + +static int smm665_probe(struct i2c_client *client) { struct i2c_adapter *adapter = client->adapter; struct smm665_data *data; @@ -588,11 +586,11 @@ mutex_init(&data->update_lock); data->client = client; - data->type = id->driver_data; - data->cmdreg = i2c_new_dummy(adapter, (client->addr & ~SMM665_REGMASK) + data->type = i2c_match_id(smm665_id, client)->driver_data; + data->cmdreg = i2c_new_dummy_device(adapter, (client->addr & ~SMM665_REGMASK) | SMM665_CMDREG_BASE); - if (!data->cmdreg) - return -ENOMEM; + if (IS_ERR(data->cmdreg)) + return PTR_ERR(data->cmdreg); switch (data->type) { case smm465: @@ -697,7 +695,7 @@ .driver = { .name = "smm665", }, - .probe = smm665_probe, + .probe_new = smm665_probe, .remove = smm665_remove, .id_table = smm665_id, }; -- Gitblit v1.6.2