linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table
@ 2021-06-16  3:44 Axel Lin
  2021-06-16  3:44 ` [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const Axel Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Axel Lin @ 2021-06-16  3:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: Alistair Francis, Lars Ivar Miljeteig, Liam Girdwood,
	linux-kernel, Axel Lin

The platform_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/sy7636a-regulator.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index c384c2b6ac46..54ab1be1001e 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -110,6 +110,7 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
 
 static const struct platform_device_id sy7636a_regulator_id_table[] = {
 	{ "sy7636a-regulator", },
+	{ }
 };
 MODULE_DEVICE_TABLE(platform, sy7636a_regulator_id_table);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const
  2021-06-16  3:44 [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Axel Lin
@ 2021-06-16  3:44 ` Axel Lin
  2021-06-16  8:21   ` Alistair
  2021-06-16  3:44 ` [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place Axel Lin
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2021-06-16  3:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: Alistair Francis, Lars Ivar Miljeteig, Liam Girdwood,
	linux-kernel, Axel Lin

It's only used in this file and never changed, make it static const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/sy7636a-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index 54ab1be1001e..c71c0a007d95 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -53,7 +53,7 @@ static const struct regulator_ops sy7636a_vcom_volt_ops = {
 	.get_status = sy7636a_get_status,
 };
 
-struct regulator_desc desc = {
+static const struct regulator_desc desc = {
 	.name = "vcom",
 	.id = 0,
 	.ops = &sy7636a_vcom_volt_ops,
@@ -61,7 +61,7 @@ struct regulator_desc desc = {
 	.owner = THIS_MODULE,
 	.enable_reg = SY7636A_REG_OPERATION_MODE_CRL,
 	.enable_mask = SY7636A_OPERATION_MODE_CRL_ONOFF,
-	.poll_enabled_time	= SY7636A_POLL_ENABLED_TIME,
+	.poll_enabled_time = SY7636A_POLL_ENABLED_TIME,
 	.regulators_node = of_match_ptr("regulators"),
 	.of_match = of_match_ptr("vcom"),
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place
  2021-06-16  3:44 [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Axel Lin
  2021-06-16  3:44 ` [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const Axel Lin
@ 2021-06-16  3:44 ` Axel Lin
  2021-06-16  8:33   ` Alistair
  2021-06-16  8:21 ` [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Alistair
  2021-06-16 16:41 ` Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Axel Lin @ 2021-06-16  3:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: Alistair Francis, Lars Ivar Miljeteig, Liam Girdwood,
	linux-kernel, Axel Lin

At the context with *rdev, use rdev_get_drvdata() is more intuitive.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/sy7636a-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
index c71c0a007d95..e021ae08cbaa 100644
--- a/drivers/regulator/sy7636a-regulator.c
+++ b/drivers/regulator/sy7636a-regulator.c
@@ -35,7 +35,7 @@ static int sy7636a_get_vcom_voltage_op(struct regulator_dev *rdev)
 
 static int sy7636a_get_status(struct regulator_dev *rdev)
 {
-	struct sy7636a *sy7636a = dev_get_drvdata(rdev->dev.parent);
+	struct sy7636a *sy7636a = rdev_get_drvdata(rdev);
 	int ret = 0;
 
 	ret = gpiod_get_value_cansleep(sy7636a->pgood_gpio);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table
  2021-06-16  3:44 [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Axel Lin
  2021-06-16  3:44 ` [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const Axel Lin
  2021-06-16  3:44 ` [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place Axel Lin
@ 2021-06-16  8:21 ` Alistair
  2021-06-16 16:41 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Alistair @ 2021-06-16  8:21 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Lars Ivar Miljeteig, Liam Girdwood, Linux Kernel Mailing List

On Wed, Jun 16, 2021, at 1:44 PM, Axel Lin wrote:
> The platform_device_id table is supposed to be zero-terminated.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

> ---
> drivers/regulator/sy7636a-regulator.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
> index c384c2b6ac46..54ab1be1001e 100644
> --- a/drivers/regulator/sy7636a-regulator.c
> +++ b/drivers/regulator/sy7636a-regulator.c
> @@ -110,6 +110,7 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)
>  
> static const struct platform_device_id sy7636a_regulator_id_table[] = {
> { "sy7636a-regulator", },
> + { }
> };
> MODULE_DEVICE_TABLE(platform, sy7636a_regulator_id_table);
>  
> -- 
> 2.25.1
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const
  2021-06-16  3:44 ` [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const Axel Lin
@ 2021-06-16  8:21   ` Alistair
  0 siblings, 0 replies; 7+ messages in thread
From: Alistair @ 2021-06-16  8:21 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Lars Ivar Miljeteig, Liam Girdwood, Linux Kernel Mailing List

On Wed, Jun 16, 2021, at 1:44 PM, Axel Lin wrote:
> It's only used in this file and never changed, make it static const.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

> ---
> drivers/regulator/sy7636a-regulator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
> index 54ab1be1001e..c71c0a007d95 100644
> --- a/drivers/regulator/sy7636a-regulator.c
> +++ b/drivers/regulator/sy7636a-regulator.c
> @@ -53,7 +53,7 @@ static const struct regulator_ops sy7636a_vcom_volt_ops = {
> .get_status = sy7636a_get_status,
> };
>  
> -struct regulator_desc desc = {
> +static const struct regulator_desc desc = {
> .name = "vcom",
> .id = 0,
> .ops = &sy7636a_vcom_volt_ops,
> @@ -61,7 +61,7 @@ struct regulator_desc desc = {
> .owner = THIS_MODULE,
> .enable_reg = SY7636A_REG_OPERATION_MODE_CRL,
> .enable_mask = SY7636A_OPERATION_MODE_CRL_ONOFF,
> - .poll_enabled_time = SY7636A_POLL_ENABLED_TIME,
> + .poll_enabled_time = SY7636A_POLL_ENABLED_TIME,
> .regulators_node = of_match_ptr("regulators"),
> .of_match = of_match_ptr("vcom"),
> };
> -- 
> 2.25.1
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place
  2021-06-16  3:44 ` [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place Axel Lin
@ 2021-06-16  8:33   ` Alistair
  0 siblings, 0 replies; 7+ messages in thread
From: Alistair @ 2021-06-16  8:33 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Lars Ivar Miljeteig, Liam Girdwood, Linux Kernel Mailing List

On Wed, Jun 16, 2021, at 1:44 PM, Axel Lin wrote:
> At the context with *rdev, use rdev_get_drvdata() is more intuitive.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Reviewed-by: Alistair Francis <alistair@alistair23.me>

> ---
> drivers/regulator/sy7636a-regulator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/sy7636a-regulator.c b/drivers/regulator/sy7636a-regulator.c
> index c71c0a007d95..e021ae08cbaa 100644
> --- a/drivers/regulator/sy7636a-regulator.c
> +++ b/drivers/regulator/sy7636a-regulator.c
> @@ -35,7 +35,7 @@ static int sy7636a_get_vcom_voltage_op(struct regulator_dev *rdev)
>  
> static int sy7636a_get_status(struct regulator_dev *rdev)
> {
> - struct sy7636a *sy7636a = dev_get_drvdata(rdev->dev.parent);
> + struct sy7636a *sy7636a = rdev_get_drvdata(rdev);
> int ret = 0;
>  
> ret = gpiod_get_value_cansleep(sy7636a->pgood_gpio);
> -- 
> 2.25.1
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table
  2021-06-16  3:44 [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Axel Lin
                   ` (2 preceding siblings ...)
  2021-06-16  8:21 ` [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Alistair
@ 2021-06-16 16:41 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-06-16 16:41 UTC (permalink / raw)
  To: Axel Lin
  Cc: Mark Brown, Alistair Francis, Lars Ivar Miljeteig, Liam Girdwood,
	linux-kernel

On Wed, 16 Jun 2021 11:44:56 +0800, Axel Lin wrote:
> The platform_device_id table is supposed to be zero-terminated.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/3] regulator: sy7636a: Add terminating entry for platform_device_id table
      commit: 686f6b31bf6cea71ca941b6dbf9e1388d54222b6
[2/3] regulator: sy7636a: Make regulator_desc static const
      commit: 31a89d297e196472875dc7d4a8f5dd0aaefcc0b4
[3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place
      commit: 830c364f4a2299e8215c40f0a2ba9229c0fdeede

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-16 16:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16  3:44 [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Axel Lin
2021-06-16  3:44 ` [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const Axel Lin
2021-06-16  8:21   ` Alistair
2021-06-16  3:44 ` [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place Axel Lin
2021-06-16  8:33   ` Alistair
2021-06-16  8:21 ` [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table Alistair
2021-06-16 16:41 ` Mark Brown

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 NNTP newsgroup(s).