2021-06-16 03:46:29

by Axel Lin

[permalink] [raw]
Subject: [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table

The platform_device_id table is supposed to be zero-terminated.

Signed-off-by: Axel Lin <[email protected]>
---
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


2021-06-16 03:47:02

by Axel Lin

[permalink] [raw]
Subject: [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place

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

Signed-off-by: Axel Lin <[email protected]>
---
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

2021-06-16 03:47:46

by Axel Lin

[permalink] [raw]
Subject: [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const

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

Signed-off-by: Axel Lin <[email protected]>
---
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

2021-06-16 08:23:14

by Alistair Francis

[permalink] [raw]
Subject: Re: [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table

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 <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

> ---
> 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
>
>

2021-06-16 08:26:13

by Alistair Francis

[permalink] [raw]
Subject: Re: [PATCH 2/3] regulator: sy7636a: Make regulator_desc static const

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 <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

> ---
> 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
>
>

2021-06-16 08:35:22

by Alistair Francis

[permalink] [raw]
Subject: Re: [PATCH 3/3] regulator: sy7636a: Use rdev_get_drvdata at proper place

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 <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

> ---
> 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
>
>

2021-06-17 00:00:49

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 1/3] regulator: sy7636a: Add terminating entry for platform_device_id table

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