[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200211164413.GG64767@atomide.com>
Date: Tue, 11 Feb 2020 08:44:13 -0800
From: Tony Lindgren <tony@...mide.com>
To: Lee Jones <lee.jones@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alan Cox <gnomes@...rguk.ukuu.org.uk>, Jiri Slaby <jslaby@...e.cz>,
Johan Hovold <johan@...nel.org>,
Merlijn Wajer <merlijn@...zup.org>,
Pavel Machek <pavel@....cz>,
Peter Hurley <peter@...leysoftware.com>,
Rob Herring <robh@...nel.org>,
Sebastian Reichel <sre@...nel.org>,
linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem
driver for droid4
* Tony Lindgren <tony@...mide.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
Powered by blists - more mailing lists