summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-09-21 23:04:53 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-09-22 00:07:07 -0500
commit5fd083f6f4b1daf9affc9a6c8415db015a57d8c7 (patch)
treebee72ce32dc04af6db383ffa59af304dda29351e /drivers/atmodem
parent7d7732d63747f742bdf1fcfb0b804515786da58e (diff)
downloadofono-5fd083f6f4b1daf9affc9a6c8415db015a57d8c7.tar.bz2
Refactor: Do not use int instead of enum
27.007 does not define an enumeration for SIM PIN/PUK values. This should be handled by ofono enum instead
Diffstat (limited to 'drivers/atmodem')
-rw-r--r--drivers/atmodem/sim.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index 1c668b17..b7d83684 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -565,21 +565,21 @@ static const char *const at_clck_cpwd_fac[] = {
[OFONO_SIM_PASSWORD_PHCORP_PIN] = "PC",
};
-static void at_pin_enable(struct ofono_sim *sim, int passwd_type, int enable,
- const char *passwd,
- ofono_sim_lock_unlock_cb_t cb, void *data)
+static void at_pin_enable(struct ofono_sim *sim,
+ enum ofono_sim_password_type passwd_type,
+ int enable, const char *passwd,
+ ofono_sim_lock_unlock_cb_t cb, void *data)
{
GAtChat *chat = ofono_sim_get_data(sim);
struct cb_data *cbd = cb_data_new(cb, data);
char buf[64];
int ret;
- int len = sizeof(at_clck_cpwd_fac) / sizeof(*at_clck_cpwd_fac);
+ unsigned int len = sizeof(at_clck_cpwd_fac) / sizeof(*at_clck_cpwd_fac);
if (!cbd)
goto error;
- if (passwd_type < 0 || passwd_type >= len ||
- !at_clck_cpwd_fac[passwd_type])
+ if (passwd_type >= len || !at_clck_cpwd_fac[passwd_type])
goto error;
snprintf(buf, sizeof(buf), "AT+CLCK=\"%s\",%i,\"%s\"",