* [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API
@ 2023-12-16 16:59 Christophe JAILLET
2023-12-18 4:51 ` patchwork-bot+chrome-platform
2023-12-18 4:51 ` patchwork-bot+chrome-platform
0 siblings, 2 replies; 3+ messages in thread
From: Christophe JAILLET @ 2023-12-16 16:59 UTC (permalink / raw
To: Benson Leung, Tzung-Bi Shih
Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
chrome-platform
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().
This is less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/platform/chrome/wilco_ec/event.c | 4 ++--
drivers/platform/chrome/wilco_ec/telemetry.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c
index f80a7c83cfba..13291fb4214e 100644
--- a/drivers/platform/chrome/wilco_ec/event.c
+++ b/drivers/platform/chrome/wilco_ec/event.c
@@ -495,7 +495,7 @@ static int event_device_add(struct acpi_device *adev)
free_dev_data:
hangup_device(dev_data);
free_minor:
- ida_simple_remove(&event_ida, minor);
+ ida_free(&event_ida, minor);
return error;
}
@@ -504,7 +504,7 @@ static void event_device_remove(struct acpi_device *adev)
struct event_device_data *dev_data = adev->driver_data;
cdev_device_del(&dev_data->cdev, &dev_data->dev);
- ida_simple_remove(&event_ida, MINOR(dev_data->dev.devt));
+ ida_free(&event_ida, MINOR(dev_data->dev.devt));
hangup_device(dev_data);
}
diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c
index 253098bace63..b7c616f3d179 100644
--- a/drivers/platform/chrome/wilco_ec/telemetry.c
+++ b/drivers/platform/chrome/wilco_ec/telemetry.c
@@ -372,7 +372,7 @@ static int telem_device_probe(struct platform_device *pdev)
dev_data = kzalloc(sizeof(*dev_data), GFP_KERNEL);
if (!dev_data) {
- ida_simple_remove(&telem_ida, minor);
+ ida_free(&telem_ida, minor);
return -ENOMEM;
}
@@ -393,7 +393,7 @@ static int telem_device_probe(struct platform_device *pdev)
error = cdev_device_add(&dev_data->cdev, &dev_data->dev);
if (error) {
put_device(&dev_data->dev);
- ida_simple_remove(&telem_ida, minor);
+ ida_free(&telem_ida, minor);
return error;
}
@@ -405,7 +405,7 @@ static void telem_device_remove(struct platform_device *pdev)
struct telem_device_data *dev_data = platform_get_drvdata(pdev);
cdev_device_del(&dev_data->cdev, &dev_data->dev);
- ida_simple_remove(&telem_ida, MINOR(dev_data->dev.devt));
+ ida_free(&telem_ida, MINOR(dev_data->dev.devt));
put_device(&dev_data->dev);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API
2023-12-16 16:59 [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET
2023-12-18 4:51 ` patchwork-bot+chrome-platform
@ 2023-12-18 4:51 ` patchwork-bot+chrome-platform
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-12-18 4:51 UTC (permalink / raw
To: Christophe JAILLET
Cc: bleung, tzungbi, linux-kernel, kernel-janitors, chrome-platform
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Sat, 16 Dec 2023 17:59:38 +0100 you wrote:
> ida_alloc() and ida_free() should be preferred to the deprecated
> ida_simple_get() and ida_simple_remove().
>
> This is less verbose.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> [...]
Here is the summary with links:
- platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API
https://git.kernel.org/chrome-platform/c/57eb6dcd32cf
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API
2023-12-16 16:59 [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET
@ 2023-12-18 4:51 ` patchwork-bot+chrome-platform
2023-12-18 4:51 ` patchwork-bot+chrome-platform
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-12-18 4:51 UTC (permalink / raw
To: Christophe JAILLET
Cc: bleung, tzungbi, linux-kernel, kernel-janitors, chrome-platform
Hello:
This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:
On Sat, 16 Dec 2023 17:59:38 +0100 you wrote:
> ida_alloc() and ida_free() should be preferred to the deprecated
> ida_simple_get() and ida_simple_remove().
>
> This is less verbose.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> [...]
Here is the summary with links:
- platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API
https://git.kernel.org/chrome-platform/c/57eb6dcd32cf
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-18 4:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-16 16:59 [PATCH] platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API Christophe JAILLET
2023-12-18 4:51 ` patchwork-bot+chrome-platform
2023-12-18 4:51 ` patchwork-bot+chrome-platform
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).