All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH v3, Part2, 3/3] udev: Add nokiacdma device
Date: Wed, 22 Dec 2010 20:23:39 -0600	[thread overview]
Message-ID: <4D12B2AB.2000000@gmail.com> (raw)
In-Reply-To: <1292959410-6566-4-git-send-email-dara.spieker-doyle@nokia.com>

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Hi Dara,

On 12/21/2010 01:23 PM, Dara Spieker-Doyle wrote:
> ---
>  plugins/udev.c |   21 +++++++++++++++++++++
>  1 files changed, 21 insertions(+), 0 deletions(-)
> 
> diff --git a/plugins/udev.c b/plugins/udev.c
> index 255755e..9447e5c 100644
> --- a/plugins/udev.c
> +++ b/plugins/udev.c
> @@ -449,6 +449,25 @@ static void add_isi(struct ofono_modem *modem,
>  	ofono_modem_register(modem);
>  }
>  
> +static void add_nokiacdma(struct ofono_modem *modem,
> +					struct udev_device *udev_device)
> +{
> +	const char *devnode;
> +	int registered;
> +
> +	DBG("modem %p", modem);
> +
> +	devnode = udev_device_get_devnode(udev_device);
> +
> +	registered = ofono_modem_get_integer(modem, "Registered");
> +	if (registered != 0)
> +		return;
> +
> +	ofono_modem_set_string(modem, "Device", devnode);
> +	ofono_modem_set_integer(modem, "Registered", 1);
> +	ofono_modem_register(modem);

This looks a little fishy to me.  How many ttys are created when this
device is plugged in?  Is it really just one or are you relying on luck
to select the right tty?

> +}
> +
>  static void add_modem(struct udev_device *udev_device)
>  {
>  	struct ofono_modem *modem;
> @@ -533,6 +552,8 @@ done:
>  		add_isi(modem, udev_device);
>  	else if (g_strcmp0(driver, "n900") == 0)
>  		add_isi(modem, udev_device);
> +	else if (g_strcmp0(driver, "nokiacdma") == 0)
> +		add_nokiacdma(modem, udev_device);
>  }
>  
>  static gboolean devpath_remove(gpointer key, gpointer value, gpointer user_data)

Regards,
-Denis

  reply	other threads:[~2010-12-23  2:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 19:23 [PATCH v3, Part2, 3/3] udev: Add nokiacdma device Dara Spieker-Doyle
2010-12-23  2:23 ` Denis Kenzior [this message]
2011-01-04  1:49   ` Dara Spieker-Doyle

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=4D12B2AB.2000000@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.