From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1305853557487399542==" MIME-Version: 1.0 From: Marcel Holtmann Subject: Re: [PATCHv2 1/7] stemodem: Add support for STK by including MBM implementation. Date: Mon, 16 Aug 2010 16:01:27 +0200 Message-ID: <1281967287.23399.36.camel@localhost.localdomain> In-Reply-To: <1281966848-14553-2-git-send-email-sjur.brandeland@stericsson.com> List-Id: To: ofono@ofono.org --===============1305853557487399542== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Sjur, > Changes: > o Use MBM stk driver implementation (avoid copying code). > Note: stemodm.h has to declare the mbm_stk_init/exit functions because > importing mbmdriver causes compile errors due to duplicated > declarations. > = > = > drivers/stemodem/stemodem.c | 2 ++ > drivers/stemodem/stemodem.h | 2 ++ > plugins/ste.c | 2 ++ > 3 files changed, 6 insertions(+), 0 deletions(-) > = > diff --git a/drivers/stemodem/stemodem.c b/drivers/stemodem/stemodem.c > index c18a8b5..0ba7878 100644 > --- a/drivers/stemodem/stemodem.c > +++ b/drivers/stemodem/stemodem.c > @@ -38,6 +38,7 @@ static int stemodem_init(void) > { > ste_voicecall_init(); > ste_gprs_context_init(); > + mbm_stk_init(); > = > return 0; > } > @@ -46,6 +47,7 @@ static void stemodem_exit(void) > { > ste_voicecall_exit(); > ste_gprs_context_exit(); > + mbm_stk_exit(); > } > = > OFONO_PLUGIN_DEFINE(stemodem, "STE modem driver", VERSION, > diff --git a/drivers/stemodem/stemodem.h b/drivers/stemodem/stemodem.h > index 267e001..e10abd3 100644 > --- a/drivers/stemodem/stemodem.h > +++ b/drivers/stemodem/stemodem.h > @@ -28,3 +28,5 @@ extern void ste_gprs_context_exit(); > extern void ste_voicecall_init(); > extern void ste_voicecall_exit(); > = > +extern void mbm_stk_init(); > +extern void mbm_stk_exit(); all the magic above is not needed. The build system builds the plugins properly and you can cross reference modem drivers from your modem plugin without any problems. > diff --git a/plugins/ste.c b/plugins/ste.c > index f3ae0b2..9cb49d3 100644 > --- a/plugins/ste.c > +++ b/plugins/ste.c > @@ -54,6 +54,7 @@ > #include > #include > #include > +#include > #include > = > #include > @@ -241,6 +242,7 @@ static void ste_post_sim(struct ofono_modem *modem) > = > gprs =3D ofono_gprs_create(modem, > OFONO_VENDOR_STE, "atmodem", data->chat); > + ofono_stk_create(modem, 0, "mbmmodem", data->chat); > gc =3D ofono_gprs_context_create(modem, 0, "stemodem", data->chat); > = > if (gprs && gc) Only these two changes are needed. Regards Marcel --===============1305853557487399542==--