sim: Turn around the order of arguments

The void *user argument was first.  It should be last instead to be
consistent with the other watch functions.
This commit is contained in:
Denis Kenzior 2010-08-30 14:29:34 -05:00
parent b74c9fb0c6
commit 4292b2dbed
5 changed files with 18 additions and 18 deletions

View File

@ -168,7 +168,7 @@ static gboolean sim_status_poll(gpointer user_data)
return FALSE;
}
static void sim_state_watch(void *user, enum ofono_sim_state new_state)
static void sim_state_watch(enum ofono_sim_state new_state, void *user)
{
struct sim_poll_data *spd = user;
@ -189,7 +189,7 @@ static void sim_watch(struct ofono_atom *atom,
spd->sim_state_watch = ofono_sim_add_state_watch(spd->sim,
sim_state_watch, spd, NULL);
sim_state_watch(spd, ofono_sim_get_state(spd->sim));
sim_state_watch(ofono_sim_get_state(spd->sim), spd);
sim_status_poll(spd);

View File

@ -94,8 +94,8 @@ typedef void (*ofono_sim_write_cb_t)(const struct ofono_error *error,
typedef void (*ofono_sim_imsi_cb_t)(const struct ofono_error *error,
const char *imsi, void *data);
typedef void (*ofono_sim_state_event_notify_cb_t)(void *data,
enum ofono_sim_state new_state);
typedef void (*ofono_sim_state_event_cb_t)(enum ofono_sim_state new_state,
void *data);
typedef void (*ofono_sim_file_read_cb_t)(int ok, int total_length, int record,
const unsigned char *data,
@ -178,8 +178,8 @@ enum ofono_sim_cphs_phase ofono_sim_get_cphs_phase(struct ofono_sim *sim);
const unsigned char *ofono_sim_get_cphs_service_table(struct ofono_sim *sim);
unsigned int ofono_sim_add_state_watch(struct ofono_sim *sim,
ofono_sim_state_event_notify_cb_t cb,
void *data, ofono_destroy_func destroy);
ofono_sim_state_event_cb_t cb,
void *data, ofono_destroy_func destroy);
void ofono_sim_remove_state_watch(struct ofono_sim *sim, unsigned int id);

View File

@ -1322,7 +1322,7 @@ static void emit_modems()
g_free(modems);
}
static void modem_sim_ready(void *user, enum ofono_sim_state new_state)
static void sim_state_watch(enum ofono_sim_state new_state, void *user)
{
struct ofono_modem *modem = user;
@ -1358,8 +1358,8 @@ static void sim_watch(struct ofono_atom *atom,
modem->sim = __ofono_atom_get_data(atom);
modem->sim_ready_watch = ofono_sim_add_state_watch(modem->sim,
modem_sim_ready,
modem, NULL);
sim_state_watch,
modem, NULL);
}
int ofono_modem_register(struct ofono_modem *modem)

View File

@ -1001,7 +1001,7 @@ static void sim_efimg_read_cb(int ok, int length, int record,
memcpy(efimg, &data[1], 9);
}
static void sim_ready(void *user, enum ofono_sim_state new_state)
static void sim_ready(enum ofono_sim_state new_state, void *user)
{
struct ofono_sim *sim = user;
@ -2056,7 +2056,7 @@ static void sim_free_state(struct ofono_sim *sim)
void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted)
{
ofono_sim_state_event_notify_cb_t notify;
ofono_sim_state_event_cb_t notify;
GSList *l;
if (inserted == TRUE && sim->state == OFONO_SIM_STATE_NOT_PRESENT)
@ -2075,7 +2075,7 @@ void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted)
struct ofono_watchlist_item *item = l->data;
notify = item->notify;
notify(item->notify_data, sim->state);
notify(sim->state, item->notify_data);
}
if (inserted)
@ -2085,8 +2085,8 @@ void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted)
}
unsigned int ofono_sim_add_state_watch(struct ofono_sim *sim,
ofono_sim_state_event_notify_cb_t notify,
void *data, ofono_destroy_func destroy)
ofono_sim_state_event_cb_t notify,
void *data, ofono_destroy_func destroy)
{
struct ofono_watchlist_item *item;
@ -2123,7 +2123,7 @@ enum ofono_sim_state ofono_sim_get_state(struct ofono_sim *sim)
static void sim_set_ready(struct ofono_sim *sim)
{
GSList *l;
ofono_sim_state_event_notify_cb_t notify;
ofono_sim_state_event_cb_t notify;
if (sim == NULL)
return;
@ -2137,7 +2137,7 @@ static void sim_set_ready(struct ofono_sim *sim)
struct ofono_watchlist_item *item = l->data;
notify = item->notify;
notify(item->notify_data, sim->state);
notify(sim->state, item->notify_data);
}
}

View File

@ -2034,7 +2034,7 @@ struct ofono_voicecall *ofono_voicecall_create(struct ofono_modem *modem,
return vc;
}
static void sim_state_watch(void *user, enum ofono_sim_state new_state)
static void sim_state_watch(enum ofono_sim_state new_state, void *user)
{
struct ofono_voicecall *vc = user;
@ -2085,7 +2085,7 @@ static void sim_watch(struct ofono_atom *atom,
sim_state_watch,
vc, NULL);
sim_state_watch(vc, ofono_sim_get_state(sim));
sim_state_watch(ofono_sim_get_state(sim), vc);
}
void ofono_voicecall_register(struct ofono_voicecall *vc)