Re: [PATCH 2/4] mfd: motmdm: Add Motorola TS 27.010 serdev modem driver for droid4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tony Lindgren <tony@xxxxxxxxxxx> [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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux