[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <5547156C.9030402@samsung.com>
Date: Mon, 04 May 2015 15:45:00 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: Krzysztof Kozlowski <k.kozlowski.k@...il.com>
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Sebastian Reichel <sre@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 01/10] mfd/extcon: max77693: Remove unused extern
declarations and max77693_dev members
On 04/29/2015 07:58 PM, Krzysztof Kozlowski wrote:
> Clean up the max77693 private header file by removing:
> 1. Left-overs from previous way of interrupt handling (driver uses
> regmap_irq_chip).
> 2. Unused members of struct 'max77693_dev' related to interrupts in
> extcon driver.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@...il.com>
> ---
> drivers/extcon/extcon-max77693.c | 4 ----
> include/linux/mfd/max77693-private.h | 8 --------
> 2 files changed, 12 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index a66bec8f6252..760e1e2cc1ce 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -1218,10 +1218,6 @@ static int max77693_muic_probe(struct platform_device *pdev)
> irq_src = MUIC_INT3;
> break;
> }
> -
> - if (irq_src < MAX77693_IRQ_GROUP_NR)
> - info->max77693->irq_masks_cur[irq_src]
> - = init_data[i].data;
> }
When removing the unused statement, I think you better to remove it as following:
because 'enum max77693_irq_source irq_src' is not used.
for (i = 0; i < num_init_data; i++) {
- enum max77693_irq_source irq_src
- = MAX77693_IRQ_GROUP_NR;
-
regmap_write(info->max77693->regmap_muic,
init_data[i].addr,
init_data[i].data);
-
- switch (init_data[i].addr) {
- case MAX77693_MUIC_REG_INTMASK1:
- irq_src = MUIC_INT1;
- break;
- case MAX77693_MUIC_REG_INTMASK2:
- irq_src = MUIC_INT2;
- break;
- case MAX77693_MUIC_REG_INTMASK3:
- irq_src = MUIC_INT3;
- break;
- }
-
- if (irq_src < MAX77693_IRQ_GROUP_NR)
- info->max77693->irq_masks_cur[irq_src]
- = init_data[i].data;
}
[snip]
Except for upper comment, Looks good to me.
Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists