From: Sergey Matyukevich <geomatsi@gmail.com>
To: ofono@ofono.org
Subject: [PATCH] gemalto: radio-settings: cleanup
Date: Fri, 23 Jul 2021 20:00:01 +0300 [thread overview]
Message-ID: <20210723170001.12102-1-geomatsi@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]
Enum ofono_radio_access_mode has been replaced by unsigned int.
This change allows to move handling of all the modes into
'switch' in the function gemalto_set_rat_mode.
---
drivers/gemaltomodem/radio-settings.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/gemaltomodem/radio-settings.c b/drivers/gemaltomodem/radio-settings.c
index 738a6908..50764f83 100644
--- a/drivers/gemaltomodem/radio-settings.c
+++ b/drivers/gemaltomodem/radio-settings.c
@@ -171,21 +171,18 @@ static void gemalto_set_rat_mode(struct ofono_radio_settings *rs,
case OFONO_RADIO_ACCESS_MODE_LTE:
val = 3;
break;
- }
-
- if (m == (OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM)) {
+ case OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM:
val = 1;
p1 = 2;
- }
-
- if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS)) {
+ break;
+ case OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS:
val = 4;
p1 = 3;
- }
-
- if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_GSM)) {
+ break;
+ case OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_GSM:
val = 5;
p1 = 3;
+ break;
}
if (val == 6)
--
2.32.0
next reply other threads:[~2021-07-23 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 17:00 Sergey Matyukevich [this message]
2021-07-27 14:31 ` [PATCH] gemalto: radio-settings: cleanup Denis Kenzior
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=20210723170001.12102-1-geomatsi@gmail.com \
--to=geomatsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).