From: Andres Salomon <dilinger@collabora.co.uk>
To: ofono@ofono.org
Subject: [PATCH] modemconf: default to grabbing the "Device" entry from the config file
Date: Fri, 02 Oct 2009 19:36:20 -0400 [thread overview]
Message-ID: <20091002193620.42404dad@mycelium.queued.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]
Previously, we manually listed every driver entry that needed Device;
this meant that we needed to edit modemconf.c every time we added
a new modem plugin. Sjoerd Simons discovered that mbm doesn't work
because it wasn't listed in modemconf, therefore Device was being
ignored. This patch makes modemconf default to setting Device, with
exceptions made for certain plugin drivers.
A better way to fix this that I started working on would be to have
each driver plugin have a table of desired/required strings, and to
keep any knowledge of drivers out of udev.c and modemconf.c. This
may be a bit of a challenge for udev.c, though. Is this something
that people would like to see?
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
---
plugins/modemconf.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/plugins/modemconf.c b/plugins/modemconf.c
index 4795749..dce31e2 100644
--- a/plugins/modemconf.c
+++ b/plugins/modemconf.c
@@ -98,9 +98,7 @@ static struct ofono_modem *create_modem(GKeyFile *keyfile, const char *group)
if (!g_strcmp0(driver, "phonesim"))
set_address(modem, keyfile, group);
-
- if (!g_strcmp0(driver, "atgen") || !g_strcmp0(driver, "g1") ||
- !g_strcmp0(driver, "calypso"))
+ else
set_device(modem, keyfile, group);
g_free(driver);
--
1.6.4.3
next reply other threads:[~2009-10-02 23:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 23:36 Andres Salomon [this message]
2009-10-03 2:25 ` [PATCH] modemconf: default to grabbing the "Device" entry from the config file Marcel Holtmann
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=20091002193620.42404dad@mycelium.queued.net \
--to=dilinger@collabora.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox