All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Ajay Gupta <ajaykuee@gmail.com>
Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org,
	Ajay Gupta <ajayg@nvidia.com>
Subject: [v2,6/6] usb: typec: ucsi: add firmware flashing support
Date: Wed, 30 Jan 2019 08:47:24 +0100	[thread overview]
Message-ID: <20190130074724.GB21468@kroah.com> (raw)

On Mon, Jan 28, 2019 at 12:37:31PM -0800, Ajay Gupta wrote:
> +static int ccg_restart(struct ucsi_ccg *uc)
> +{
> +	struct device *dev = uc->dev;
> +	int status;
> +
> +	status = ucsi_ccg_init(uc);
> +	if (status < 0) {
> +		dev_err(dev, "ucsi_ccg_start fail, err=%d\n", status);
> +		return status;
> +	}
> +
> +	status = devm_request_threaded_irq(dev, uc->irq, NULL, ccg_irq_handler,
> +					   IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
> +					   dev_name(dev), uc);

Are you _sure_ you can use devm here?  That's almost always the wrong
thing to do as the irq will stick around after your driver could be
unloaded.  Just be very careful here, and look at all of the patches in
the kernel tree where stuff like this has been fixed to make sure you
are not also doing the same thing.

thanks,

greg k-h

             reply	other threads:[~2019-01-30  7:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30  7:47 Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-01-31  0:48 [v2,6/6] usb: typec: ucsi: add firmware flashing support Ajay Gupta
2019-01-31  0:47 Ajay Gupta
2019-01-30  7:49 Greg Kroah-Hartman
2019-01-28 20:37 Ajay Gupta

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=20190130074724.GB21468@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ajayg@nvidia.com \
    --cc=ajaykuee@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.