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

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

 



Hi!

> $ printf "ATH\r" > /dev/motmdm1
> H:OK
> 
> Also SMS can be sent with this patch using /dev/motmdm3 for sending,
> and /dev/motmdm9 for receiving messages, and /dev/motmdm10 can be
> used for SIM access.
> 
> Note that the audio mixer needs additional patches though. I will be
> sending those as a separate series of patches.
> 
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

Reviewed-by: Pavel Machek <pavel@xxxxxx>

Some minor comments are below.

> +++ b/drivers/tty/serdev/protocol/Kconfig
> @@ -0,0 +1,14 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# Serial bus device driver protocol specific configuration
> +#
> +
> +config SERIAL_DEV_NGSM_MOTMDM
> +	tristate "Motorola Modem TS 27.010 Serdev Protocol Driver"
> +	depends on N_GSM && PHY_MAPPHONE_MDM6600
> +	help
> +	  Select this for Motorola modems using TS 27.010 serial line
> +	  discipline such as MDM6600 modem found on Motorola Mapphone
> +	  devices like Droid4

I'd add "." at the end of sentence.

> +/*
> + * Character devices for DLCI channels with no serdev drivers
> + */
> +static int motmdm_cdev_open(struct inode *inode, struct file *file)
> +{
> +	struct motmdm_cdev *cdata;
> +	int ret = 0;
> +
> +	cdata = container_of(inode->i_cdev, struct motmdm_cdev, cdev);
> +	get_device(cdata->dev);
> +	nonseekable_open(inode, file);
> +	file->private_data = cdata;
> +
> +	down_write(&cdata->rwsem);
> +	if (cdata->disconnected) {
> +		ret = -ENODEV;
> +		goto unlock;
> +	}
> +
> +unlock:
> +	up_write(&cdata->rwsem);

You can delete goto and the label here.

> +static int motmdm_cdev_release(struct inode *inode, struct file *file)
> +{
> +	struct motmdm_cdev *cdata = file->private_data;
> +
> +	down_write(&cdata->rwsem);
> +	if (cdata->disconnected)
> +		goto unlock;
> +
> +unlock:
> +	up_write(&cdata->rwsem);

And here... unless it is some kind of preparation for next patch?

> +MODULE_DESCRIPTION("Motorola Modem TS 27.010 serdev driver");
> +MODULE_AUTHOR("Tony Lindgren <tony@xxxxxxxxxxx");

Missing ">" at the end of email address.

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux