Re: [RESEND PATCH v3 1/2] i2c: i2c-mux-gpio: Factor out pdev->dev in _probe_dt()

2021-01-17 Thread Wolfram Sang
On Wed, Nov 18, 2020 at 03:40:24PM -0800, Evan Green wrote:
> Factor out >dev into a local variable in preparation for
> the ACPI enablement of this function, which will utilize the variable
> more.
> 
> Signed-off-by: Evan Green 

Applied to for-next, thanks!



signature.asc
Description: PGP signature


Re: [RESEND PATCH v3 1/2] i2c: i2c-mux-gpio: Factor out pdev->dev in _probe_dt()

2021-01-15 Thread Peter Rosin
On 2020-11-19 00:40, Evan Green wrote:
> Factor out >dev into a local variable in preparation for
> the ACPI enablement of this function, which will utilize the variable
> more.
> 
> Signed-off-by: Evan Green 
> ---
> 
> Changes in v3:
>  - Introduced minor >dev to dev refactor (Peter)
> 
>  drivers/i2c/muxes/i2c-mux-gpio.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Acked-by: Peter Rosin 

(this patch doesn't make much sense without 2/2)

Cheers,
Peter


[RESEND PATCH v3 1/2] i2c: i2c-mux-gpio: Factor out pdev->dev in _probe_dt()

2020-11-18 Thread Evan Green
Factor out >dev into a local variable in preparation for
the ACPI enablement of this function, which will utilize the variable
more.

Signed-off-by: Evan Green 
---

Changes in v3:
 - Introduced minor >dev to dev refactor (Peter)

 drivers/i2c/muxes/i2c-mux-gpio.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 4effe563e9e8d..caaa782b50d83 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -53,6 +53,7 @@ static int i2c_mux_gpio_deselect(struct i2c_mux_core *muxc, 
u32 chan)
 static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
struct platform_device *pdev)
 {
+   struct device *dev = >dev;
struct device_node *np = pdev->dev.of_node;
struct device_node *adapter_np, *child;
struct i2c_adapter *adapter;
@@ -77,11 +78,11 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
 
mux->data.n_values = of_get_child_count(np);
 
-   values = devm_kcalloc(>dev,
+   values = devm_kcalloc(dev,
  mux->data.n_values, sizeof(*mux->data.values),
  GFP_KERNEL);
if (!values) {
-   dev_err(>dev, "Cannot allocate values array");
+   dev_err(dev, "Cannot allocate values array");
return -ENOMEM;
}
 
-- 
2.26.2