* [PATCH] modemconf: default to grabbing the "Device" entry from the config file
@ 2009-10-02 23:36 Andres Salomon
2009-10-03 2:25 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Andres Salomon @ 2009-10-02 23:36 UTC (permalink / raw)
To: ofono
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] modemconf: default to grabbing the "Device" entry from the config file
2009-10-02 23:36 [PATCH] modemconf: default to grabbing the "Device" entry from the config file Andres Salomon
@ 2009-10-03 2:25 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2009-10-03 2:25 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]
Hi Andres,
> 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?
actually modemconf is only for static devices inside embedded systems
like a mobile phone. The desktop should auto-discover modems via udev
and MBM is one of them that get auto-discovered nicely when having a
proper libudev in place.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-03 2:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-02 23:36 [PATCH] modemconf: default to grabbing the "Device" entry from the config file Andres Salomon
2009-10-03 2:25 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox