]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/sti/sti-netlink.c
SDTI: Add netlink support for debug message output.
[linux-2.6-omap-h63xx.git] / drivers / misc / sti / sti-netlink.c
index f1f8a48f4aa3cce73d135a9e57943ddf61725dca..b198e4c3cc2b8cdf60337bef75d2f32bc2395f7e 100644 (file)
@@ -25,6 +25,7 @@ enum {
        STI_WRITE,
 };
 
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2)
 static int sti_netlink_read(int pid, int seq, void *payload, int size)
 {
        struct sk_buff *skb;
@@ -55,6 +56,7 @@ nlmsg_failure:
 
        return -EINVAL;
 }
+#endif
 
 /*
  * We abuse nlmsg_type and nlmsg_flags for our purposes.
@@ -66,7 +68,7 @@ static int sti_netlink_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 {
        void *data;
        u8 chan, id;
-       int size, ret = 0, len = 0;
+       int size, ret = 0;
 
        data    = NLMSG_DATA(nlh);
        chan    = (nlh->nlmsg_flags >> 8) & 0xff;
@@ -77,7 +79,10 @@ static int sti_netlink_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
        case STI_WRITE:
                sti_channel_write_trace(size, id, data, chan);
                break;
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2)
        case STI_READ:
+               int len = 0;
+
                data = kmalloc(size, GFP_KERNEL);
                if (!data)
                        return -ENOMEM;
@@ -88,6 +93,7 @@ static int sti_netlink_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
                                       data, len);
                kfree(data);
                break;
+#endif
        default:
                return -ENOTTY;
        }