linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Lee Jones <lee.jones@linaro.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4
Date: Thu, 20 Feb 2020 11:52:02 -0800	[thread overview]
Message-ID: <20200220195202.GV37466@atomide.com> (raw)
In-Reply-To: <20200219170106.38543-3-tony@atomide.com>

* Tony Lindgren <tony@atomide.com> [700101 00:00]:
> +static int motmdm_register_dlci(struct device *dev,
> +				struct motmdm_dlci *mot_dlci)
> +{
> +	struct motmdm *ddata;
> +	struct gsm_serdev *gsd;
> +	struct gsm_serdev_dlci *gsm_dlci;
> +	int err;
> +
> +	if (!dev || !mot_dlci || !mot_dlci->line)
> +		return -EINVAL;
> +
> +	err = pm_runtime_get_sync(dev);
> +	if ((err != -EINPROGRESS) && err < 0) {
> +		pm_runtime_put_noidle(dev);
> +
> +		return err;
> +	}
> +
> +	ddata = gsm_serdev_get_drvdata(dev);
> +	gsd = &ddata->gsd;
> +	gsm_dlci = &mot_dlci->gsm_dlci;
> +	INIT_LIST_HEAD(&mot_dlci->list);
> +	init_waitqueue_head(&mot_dlci->read_queue);
> +	gsm_dlci->line = mot_dlci->line;
> +	gsm_dlci->receive_buf = motmdm_dlci_receive_buf;
> +
> +	err = gsm_serdev_register_dlci(gsd, gsm_dlci);
> +	if (err) {
> +		dev_warn(dev, "error registering dlci%i: %i\n",
> +			 mot_dlci->line, err);
> +		kfifo_free(&mot_dlci->read_fifo);
> +		memset(gsm_dlci, 0, sizeof(*gsm_dlci));
> +	} else {
> +		mot_dlci->privdata = ddata;
> +	}

Here we want mot_dlci->privdata initialized before
gsm_serdev_register_dlci, otherwise we may get an interrupt
between gsm_serdev_register_dlci and setting mot_dlci->privdata.

So I'll be sending out v4 series.

Regards,

Tony

  reply	other threads:[~2020-02-20 19:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 17:01 [PATCHv3 0/4] n_gsm serdev support and mfd driver for droid4 modem Tony Lindgren
2020-02-19 17:01 ` [PATCH 1/4] tty: n_gsm: Add support for serdev drivers Tony Lindgren
2020-02-19 17:01 ` [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-02-20 19:52   ` Tony Lindgren [this message]
2020-02-19 17:01 ` [PATCH 3/4] dt-bindings: mfd: motmdm: Add binding for motorola-mdm Tony Lindgren
2020-02-20 19:47   ` Tony Lindgren
2020-02-19 17:01 ` [PATCH 4/4] ARM: dts: omap4-droid4: Enable basic modem support Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2020-02-20 19:59 [PATCHv4 0/4] n_gsm serdev support and mfd driver for droid4 modem Tony Lindgren
2020-02-20 19:59 ` [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-02-26 11:55   ` Lee Jones
2020-02-26 14:43     ` Tony Lindgren
2020-03-06 12:34       ` Greg Kroah-Hartman
2020-02-10  4:01 [PATCHv2 0/4] n_gsm serdev support and mfd driver for droid4 modem Tony Lindgren
2020-02-10  4:01 ` [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4 Tony Lindgren
2020-02-11 16:44   ` Tony Lindgren

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=20200220195202.GV37466@atomide.com \
    --to=tony@atomide.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --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;
as well as URLs for NNTP newsgroup(s).