summaryrefslogtreecommitdiffstats
path: root/drivers/stemodem
diff options
context:
space:
mode:
authorSjur Brændeland <sjur.brandeland@stericsson.com>2010-11-21 21:55:15 +0100
committerDenis Kenzior <denkenz@gmail.com>2010-11-23 03:06:34 -0600
commita32965de27f4caad7667ae88676442d9f84bdf4b (patch)
tree30a1ed77dd1185a7f086ba555687918c8e99f882 /drivers/stemodem
parent7cde43b4b6756f62233857c35688fb76d54591ac (diff)
downloadofono-a32965de27f4caad7667ae88676442d9f84bdf4b.tar.bz2
stemodem: Change use of types
Use the type __u32 for sequence counting rather than guint32, and "void *" instead of gpointer. Reduce the size of RTNL message buffer from 4096 to 1024, as this should be sufficient to hold the NEWLINK message.
Diffstat (limited to 'drivers/stemodem')
-rw-r--r--drivers/stemodem/caif_rtnl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/stemodem/caif_rtnl.c b/drivers/stemodem/caif_rtnl.c
index 5d4073a9..4c004464 100644
--- a/drivers/stemodem/caif_rtnl.c
+++ b/drivers/stemodem/caif_rtnl.c
@@ -41,7 +41,7 @@
#define NLMSG_TAIL(nmsg) \
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
-#define RTNL_MSG_SIZE 4096
+#define RTNL_MSG_SIZE 1024
struct rtnl_msg {
struct nlmsghdr n;
@@ -50,17 +50,17 @@ struct rtnl_msg {
};
struct iplink_req {
- guint32 rtnlmsg_seqnr;
- gpointer user_data;
+ __u32 rtnlmsg_seqnr;
+ void *user_data;
caif_rtnl_create_cb_t callback;
};
static GSList *pending_requests;
-static guint32 rtnl_seqnr;
+static __u32 rtnl_seqnr;
static guint rtnl_watch;
static GIOChannel *rtnl_channel;
-static struct iplink_req *find_request(guint32 seq)
+static struct iplink_req *find_request(__u32 seq)
{
GSList *list;
@@ -169,7 +169,7 @@ static int add_attribute(struct nlmsghdr *n, unsigned int maxlen, int type,
return 0;
}
-static inline void prep_rtnl_req(struct rtnl_msg *msg, int reqtype, guint seqnr)
+static inline void prep_rtnl_req(struct rtnl_msg *msg, int reqtype, __u32 seqnr)
{
msg->n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
msg->n.nlmsg_flags = NLM_F_REQUEST|NLM_F_CREATE|NLM_F_EXCL;
@@ -179,7 +179,7 @@ static inline void prep_rtnl_req(struct rtnl_msg *msg, int reqtype, guint seqnr)
}
static gboolean netlink_event(GIOChannel *chan,
- GIOCondition cond, gpointer data)
+ GIOCondition cond, void *data)
{
unsigned char buf[RTNL_MSG_SIZE];
int len, sk;