Move dump_msg() to isi.h as static inline
authorAki Niemi <aki.niemi@nokia.com>
Sat, 22 Aug 2009 12:37:34 +0000 (15:37 +0300)
committerAki Niemi <aki.niemi@nokia.com>
Sat, 22 Aug 2009 12:37:34 +0000 (15:37 +0300)
drivers/isimodem/isi.h
drivers/isimodem/isimodem.c

index d80fb4e..134359e 100644 (file)
@@ -53,7 +53,17 @@ static inline struct isi_cb_data *isi_cb_data_new(struct ofono_modem *modem,
        return ret;
 }
 
-void dump_msg(const unsigned char *msg, size_t len);
+static inline void dump_msg(const unsigned char *msg, size_t len)
+{
+       char dumpstr[len * 5 + len / 10 + 1];
+       size_t i;
+
+       for (i = 0; i < len; i++)
+               sprintf(dumpstr + i * 5, "0x%02x%s",
+                       msg[i], (i + 1) % 10 == 0 ? "\n" : " ");
+
+       DBG("\n%s\n", dumpstr);
+}
 
 extern void isi_phonebook_init();
 extern void isi_phonebook_exit();
index cffcc29..fc132be 100644 (file)
@@ -49,19 +49,6 @@ struct isi_data {
 static GPhonetNetlink *link = NULL;
 static GSList *g_modems = NULL;
 
-
-void dump_msg(const unsigned char *msg, size_t len)
-{
-       char dumpstr[len * 5 + len / 10 + 1];
-       size_t i;
-
-       for (i = 0; i < len; i++)
-               sprintf(dumpstr + i * 5, "0x%02x%s",
-                       msg[i], (i + 1) % 10 == 0 ? "\n" : " ");
-
-       DBG("%zd bytes:\n%s", len, dumpstr);
-}
-
 static struct isi_data *find_modem_by_idx(GSList *modems, GIsiModem *idx)
 {
        GSList *m = NULL;