From: Tony Lindgren <tony@atomide.com>
To: Lee Jones <lee.jones@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>,
Jiri Slaby <jslaby@suse.cz>, Johan Hovold <johan@kernel.org>,
Merlijn Wajer <merlijn@wizzup.org>, Pavel Machek <pavel@ucw.cz>,
Peter Hurley <peter@hurleysoftware.com>,
Rob Herring <robh@kernel.org>, Sebastian Reichel <sre@kernel.org>,
linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4
Date: Tue, 11 Feb 2020 08:44:13 -0800 [thread overview]
Message-ID: <20200211164413.GG64767@atomide.com> (raw)
In-Reply-To: <20200210040107.10306-3-tony@atomide.com>
* Tony Lindgren <tony@atomide.com> [200210 04:02]:
> --- /dev/null
> +++ b/drivers/mfd/motorola-mdm.c
...
> +struct motmdm_dlci {
> + struct gsm_serdev_dlci gsm_dlci;
> + struct list_head node;
> + wait_queue_head_t read_queue;
> + struct kfifo read_fifo;
> + int line;
> + u16 id;
> + int (*send_command)(struct device *dev, struct motmdm_dlci *mot_dlci,
> + unsigned long timeout_ms, const unsigned char *cmd,
> + size_t cmdlen,
> + unsigned char *rsp, size_t rsplen);
Looks like the send_command above is now useless and can be
left out, incremental patch below for reference.
I'll be sending out v3 series of patches after waiting few days
for comments.
Regards,
Tony
8< ------------------
diff --git a/drivers/mfd/motorola-mdm.c b/drivers/mfd/motorola-mdm.c
--- a/drivers/mfd/motorola-mdm.c
+++ b/drivers/mfd/motorola-mdm.c
@@ -92,10 +92,6 @@ struct motmdm_dlci {
struct kfifo read_fifo;
int line;
u16 id;
- int (*send_command)(struct device *dev, struct motmdm_dlci *mot_dlci,
- unsigned long timeout_ms, const unsigned char *cmd,
- size_t cmdlen,
- unsigned char *rsp, size_t rsplen);
struct list_head list;
void *privdata; /* Do not use, internal data */
void *drvdata; /* Available for consumer drivers */
@@ -419,11 +415,11 @@ static int motmdm_write(struct device *dev, struct motmdm_dlci *mot_dlci,
* Helper for child device drivers to send a command to a DLCI and wait
* for result with a matching packet ID.
*/
-static int motmdm_dlci_send_command(struct device *dev,
- struct motmdm_dlci *mot_dlci,
- unsigned long timeout_ms,
- const unsigned char *cmd, size_t cmdlen,
- unsigned char *rsp, size_t rsplen)
+static int motmdm_send_command(struct device *dev,
+ struct motmdm_dlci *mot_dlci,
+ unsigned long timeout_ms,
+ const unsigned char *cmd, size_t cmdlen,
+ unsigned char *rsp, size_t rsplen)
{
struct motmdm_response *resp, *tmp;
struct list_head *pos, *q;
@@ -502,7 +498,6 @@ static int motmdm_register_dlci(struct device *dev,
ddata = gsm_serdev_get_drvdata(dev);
gsd = &ddata->gsd;
gsm_dlci = &mot_dlci->gsm_dlci;
- mot_dlci->send_command = motmdm_dlci_send_command;
INIT_LIST_HEAD(&mot_dlci->list);
init_waitqueue_head(&mot_dlci->read_queue);
gsm_dlci->line = mot_dlci->line;
@@ -929,9 +924,8 @@ static int motmdm_check_revision(struct device *dev)
goto free_buf;
while (retries--) {
- err = motmdm_dlci_send_command(dev, mot_dlci, 1000,
- cmd, strlen(cmd),
- buf, PAGE_SIZE);
+ err = motmdm_send_command(dev, mot_dlci, 1000, cmd, strlen(cmd),
+ buf, PAGE_SIZE);
if (err >= 0) {
msleep(100);
break;
--
2.25.0
next prev parent reply other threads:[~2020-02-11 16:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 1/4] tty: n_gsm: Add support for serdev drivers 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 [this message]
2020-02-10 4:01 ` [PATCH 3/4] dt-bindings: mfd: motmdm: Add binding for motorola-mdm Tony Lindgren
2020-02-19 22:13 ` Rob Herring
2020-02-20 19:20 ` Tony Lindgren
2020-02-10 4: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
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=20200211164413.GG64767@atomide.com \
--to=tony@atomide.com \
--cc=devicetree@vger.kernel.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=jslaby@suse.cz \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=pavel@ucw.cz \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
--cc=sre@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).