modem: Conform to coding style item M9
authorDenis Kenzior <denkenz@gmail.com>
Sat, 16 Jun 2012 13:10:55 +0000 (08:10 -0500)
committerDenis Kenzior <denkenz@gmail.com>
Sat, 16 Jun 2012 14:50:05 +0000 (09:50 -0500)
include/modem.h

index 4efb2da..87c8441 100644 (file)
@@ -36,6 +36,40 @@ enum ofono_modem_type {
        OFONO_MODEM_TYPE_SAP,
 };
 
+typedef void (*ofono_modem_online_cb_t)(const struct ofono_error *error,
+                                       void *data);
+
+struct ofono_modem_driver {
+       const char *name;
+       enum ofono_modem_type modem_type;
+
+       /* Detect existence of device and initialize any device-specific data
+        * structures */
+       int (*probe)(struct ofono_modem *modem);
+
+       /* Destroy data structures allocated during probe and cleanup */
+       void (*remove)(struct ofono_modem *modem);
+
+       /* Power up device */
+       int (*enable)(struct ofono_modem *modem);
+
+       /* Power down device */
+       int (*disable)(struct ofono_modem *modem);
+
+       /* Enable or disable cellular radio */
+       void (*set_online)(struct ofono_modem *modem, ofono_bool_t online,
+                               ofono_modem_online_cb_t callback, void *data);
+
+       /* Populate the atoms available without SIM / Locked SIM */
+       void (*pre_sim)(struct ofono_modem *modem);
+
+       /* Populate the atoms that are available with SIM / Unlocked SIM*/
+       void (*post_sim)(struct ofono_modem *modem);
+
+       /* Populate the atoms available online */
+       void (*post_online)(struct ofono_modem *modem);
+};
+
 void ofono_modem_add_interface(struct ofono_modem *modem,
                                const char *interface);
 void ofono_modem_remove_interface(struct ofono_modem *modem,
@@ -77,40 +111,6 @@ int ofono_modem_set_boolean(struct ofono_modem *modem,
 ofono_bool_t ofono_modem_get_boolean(struct ofono_modem *modem,
                                        const char *key);
 
-typedef void (*ofono_modem_online_cb_t)(const struct ofono_error *error,
-                                       void *data);
-
-struct ofono_modem_driver {
-       const char *name;
-       enum ofono_modem_type modem_type;
-
-       /* Detect existence of device and initialize any device-specific data
-        * structures */
-       int (*probe)(struct ofono_modem *modem);
-
-       /* Destroy data structures allocated during probe and cleanup */
-       void (*remove)(struct ofono_modem *modem);
-
-       /* Power up device */
-       int (*enable)(struct ofono_modem *modem);
-
-       /* Power down device */
-       int (*disable)(struct ofono_modem *modem);
-
-       /* Enable or disable cellular radio */
-       void (*set_online)(struct ofono_modem *modem, ofono_bool_t online,
-                               ofono_modem_online_cb_t callback, void *data);
-
-       /* Populate the atoms available without SIM / Locked SIM */
-       void (*pre_sim)(struct ofono_modem *modem);
-
-       /* Populate the atoms that are available with SIM / Unlocked SIM*/
-       void (*post_sim)(struct ofono_modem *modem);
-
-       /* Populate the atoms available online */
-       void (*post_online)(struct ofono_modem *modem);
-};
-
 int ofono_modem_driver_register(const struct ofono_modem_driver *);
 void ofono_modem_driver_unregister(const struct ofono_modem_driver *);