mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: linux-kernel@vger.kernel.org, briannorris@chromium.org,
	dtor@chromium.org, dianders@chromium.org
Subject: Re: [PATCH v2] mfd: cros_ec: Free IRQ on exit
Date: Mon, 19 Jun 2017 15:51:15 +0100	[thread overview]
Message-ID: <20170619145115.qzsbu3yej5obkta7@dell> (raw)
In-Reply-To: <1497256966-29082-1-git-send-email-jeffy.chen@rock-chips.com>

On Mon, 12 Jun 2017, Jeffy Chen wrote:

> Currently we request the irq when probing, but never free it. So after
> unbind ec driver, this irq will be left requested, which would break
> the next bind:
> [ 2683.338437] genirq: Flags mismatch irq 64. 00002008 (chromeos-ec) vs. 00002008 (chromeos-ec)
> [ 2683.338591] cros-ec-spi spi5.0: request irq 64: error -16
> [ 2683.338610] cros-ec-spi spi5.0: cannot register EC
> [ 2683.338656] cros-ec-spi: probe of spi5.0 failed with error -16
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> 
> ---
> 
> Changes in v2:
> Improve the commit message.
> 
>  drivers/mfd/cros_ec.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c
> index e31ac60..dc6ce90 100644
> --- a/drivers/mfd/cros_ec.c
> +++ b/drivers/mfd/cros_ec.c
> @@ -183,6 +183,9 @@ int cros_ec_remove(struct cros_ec_device *ec_dev)
>  
>  	cros_ec_acpi_remove_gpe_handler();
>  
> +	if (ec_dev->irq)
> +		free_irq(ec_dev->irq, ec_dev);
> +
>  	return 0;
>  }
>  EXPORT_SYMBOL(cros_ec_remove);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2017-06-19 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12  8:42 Jeffy Chen
2017-06-19 14:51 ` Lee Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170619145115.qzsbu3yej5obkta7@dell \
    --to=lee.jones@linaro.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=dtor@chromium.org \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®