* [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()"
@ 2022-08-18 20:31 Wolfram Sang
2022-08-20 6:22 ` Wolfram Sang
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2022-08-18 20:31 UTC (permalink / raw)
To: linux-i2c; +Cc: Andy Shevchenko, Josef Johansson, Wolfram Sang
This reverts commit 9ae551ded5ba55f96a83cd0811f7ef8c2f329d0c. We got a
regression report, so ensure this machine boots again. We will come back
with a better version hopefully.
Link: https://lore.kernel.org/r/4d2d5b04-0b6c-1cb1-a63f-dc06dfe1b5da@oderland.se
Signed-off-by: Wolfram Sang <wsa@kernel.org>
---
drivers/i2c/busses/i2c-scmi.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c
index 79798fc7462a..6746aa46d96c 100644
--- a/drivers/i2c/busses/i2c-scmi.c
+++ b/drivers/i2c/busses/i2c-scmi.c
@@ -30,7 +30,7 @@ struct acpi_smbus_cmi {
u8 cap_info:1;
u8 cap_read:1;
u8 cap_write:1;
- const struct smbus_methods_t *methods;
+ struct smbus_methods_t *methods;
};
static const struct smbus_methods_t smbus_methods = {
@@ -361,6 +361,7 @@ static acpi_status acpi_smbus_cmi_query_methods(acpi_handle handle, u32 level,
static int acpi_smbus_cmi_add(struct acpi_device *device)
{
struct acpi_smbus_cmi *smbus_cmi;
+ const struct acpi_device_id *id;
int ret;
smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL);
@@ -368,7 +369,6 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
return -ENOMEM;
smbus_cmi->handle = device->handle;
- smbus_cmi->methods = device_get_match_data(&device->dev);
strcpy(acpi_device_name(device), ACPI_SMBUS_HC_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_SMBUS_HC_CLASS);
device->driver_data = smbus_cmi;
@@ -376,6 +376,11 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
smbus_cmi->cap_read = 0;
smbus_cmi->cap_write = 0;
+ for (id = acpi_smbus_cmi_ids; id->id[0]; id++)
+ if (!strcmp(id->id, acpi_device_hid(device)))
+ smbus_cmi->methods =
+ (struct smbus_methods_t *) id->driver_data;
+
acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1,
acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL);
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()"
2022-08-18 20:31 [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()" Wolfram Sang
@ 2022-08-20 6:22 ` Wolfram Sang
2022-08-21 8:24 ` Wolfram Sang
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2022-08-20 6:22 UTC (permalink / raw)
To: linux-i2c; +Cc: Andy Shevchenko, Josef Johansson
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Thu, Aug 18, 2022 at 10:31:13PM +0200, Wolfram Sang wrote:
> This reverts commit 9ae551ded5ba55f96a83cd0811f7ef8c2f329d0c. We got a
> regression report, so ensure this machine boots again. We will come back
> with a better version hopefully.
>
> Link: https://lore.kernel.org/r/4d2d5b04-0b6c-1cb1-a63f-dc06dfe1b5da@oderland.se
> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()"
2022-08-20 6:22 ` Wolfram Sang
@ 2022-08-21 8:24 ` Wolfram Sang
2022-08-23 14:34 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2022-08-21 8:24 UTC (permalink / raw)
To: linux-i2c, Andy Shevchenko, Josef Johansson
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
> > Link: https://lore.kernel.org/r/4d2d5b04-0b6c-1cb1-a63f-dc06dfe1b5da@oderland.se
> > Signed-off-by: Wolfram Sang <wsa@kernel.org>
>
> Applied to for-current, thanks!
Added Reported-by tag from Josef, well deserved!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()"
2022-08-21 8:24 ` Wolfram Sang
@ 2022-08-23 14:34 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-08-23 14:34 UTC (permalink / raw)
To: Wolfram Sang, linux-i2c, Josef Johansson
On Sun, Aug 21, 2022 at 10:24:48AM +0200, Wolfram Sang wrote:
> > > Link: https://lore.kernel.org/r/4d2d5b04-0b6c-1cb1-a63f-dc06dfe1b5da@oderland.se
> > > Signed-off-by: Wolfram Sang <wsa@kernel.org>
> >
> > Applied to for-current, thanks!
>
> Added Reported-by tag from Josef, well deserved!
Ah, revert is there, thanks. I will respin then with checking the case Josef
reported about.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-23 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-18 20:31 [PATCH] Revert "i2c: scmi: Replace open coded device_get_match_data()" Wolfram Sang
2022-08-20 6:22 ` Wolfram Sang
2022-08-21 8:24 ` Wolfram Sang
2022-08-23 14:34 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox