diff mbox series

power: supply: cpcap: Add missing IRQF_ONESHOT to fix regression

Message ID 20201230101911.11747-1-tony@atomide.com (mailing list archive)
State New
Headers show
Series power: supply: cpcap: Add missing IRQF_ONESHOT to fix regression | expand

Commit Message

Tony Lindgren Dec. 30, 2020, 10:19 a.m. UTC
Commit 25d76fed7ffe ("phy: cpcap-usb: Use IRQF_ONESHOT") started causing
errors loading phy-cpcap-usb driver:

cpcap_battery cpcap_battery.0: failed to register power supply
genirq: Flags mismatch irq 211. 00002080 (se0conn) vs. 00000080 (se0conn)
cpcap-usb-phy cpcap-usb-phy.0: could not get irq se0conn: -16

Let's fix this by adding the missing IRQF_ONESHOT to also cpcap-battery
and cpcap-charger drivers.

Fixes: 25d76fed7ffe ("phy: cpcap-usb: Use IRQF_ONESHOT")
Reported-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/power/supply/cpcap-battery.c | 2 +-
 drivers/power/supply/cpcap-charger.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Sebastian Reichel Jan. 3, 2021, 1:57 a.m. UTC | #1
Hi Tony,

On Wed, Dec 30, 2020 at 12:19:11PM +0200, Tony Lindgren wrote:
> Commit 25d76fed7ffe ("phy: cpcap-usb: Use IRQF_ONESHOT") started causing
> errors loading phy-cpcap-usb driver:
> 
> cpcap_battery cpcap_battery.0: failed to register power supply
> genirq: Flags mismatch irq 211. 00002080 (se0conn) vs. 00000080 (se0conn)
> cpcap-usb-phy cpcap-usb-phy.0: could not get irq se0conn: -16
> 
> Let's fix this by adding the missing IRQF_ONESHOT to also cpcap-battery
> and cpcap-charger drivers.
> 
> Fixes: 25d76fed7ffe ("phy: cpcap-usb: Use IRQF_ONESHOT")
> Reported-by: Merlijn Wajer <merlijn@wizzup.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/cpcap-battery.c | 2 +-
>  drivers/power/supply/cpcap-charger.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c
> --- a/drivers/power/supply/cpcap-battery.c
> +++ b/drivers/power/supply/cpcap-battery.c
> @@ -666,7 +666,7 @@ static int cpcap_battery_init_irq(struct platform_device *pdev,
>  
>  	error = devm_request_threaded_irq(ddata->dev, irq, NULL,
>  					  cpcap_battery_irq_thread,
> -					  IRQF_SHARED,
> +					  IRQF_SHARED | IRQF_ONESHOT,
>  					  name, ddata);
>  	if (error) {
>  		dev_err(ddata->dev, "could not get irq %s: %i\n",
> diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
> --- a/drivers/power/supply/cpcap-charger.c
> +++ b/drivers/power/supply/cpcap-charger.c
> @@ -708,7 +708,7 @@ static int cpcap_usb_init_irq(struct platform_device *pdev,
>  
>  	error = devm_request_threaded_irq(ddata->dev, irq, NULL,
>  					  cpcap_charger_irq_thread,
> -					  IRQF_SHARED,
> +					  IRQF_SHARED | IRQF_ONESHOT,
>  					  name, ddata);
>  	if (error) {
>  		dev_err(ddata->dev, "could not get irq %s: %i\n",
> -- 
> 2.29.2
diff mbox series

Patch

diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c
--- a/drivers/power/supply/cpcap-battery.c
+++ b/drivers/power/supply/cpcap-battery.c
@@ -666,7 +666,7 @@  static int cpcap_battery_init_irq(struct platform_device *pdev,
 
 	error = devm_request_threaded_irq(ddata->dev, irq, NULL,
 					  cpcap_battery_irq_thread,
-					  IRQF_SHARED,
+					  IRQF_SHARED | IRQF_ONESHOT,
 					  name, ddata);
 	if (error) {
 		dev_err(ddata->dev, "could not get irq %s: %i\n",
diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
--- a/drivers/power/supply/cpcap-charger.c
+++ b/drivers/power/supply/cpcap-charger.c
@@ -708,7 +708,7 @@  static int cpcap_usb_init_irq(struct platform_device *pdev,
 
 	error = devm_request_threaded_irq(ddata->dev, irq, NULL,
 					  cpcap_charger_irq_thread,
-					  IRQF_SHARED,
+					  IRQF_SHARED | IRQF_ONESHOT,
 					  name, ddata);
 	if (error) {
 		dev_err(ddata->dev, "could not get irq %s: %i\n",