]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/misc/sti/sti-netlink.c
OMAP2 STI: fix build breakage
[linux-2.6-omap-h63xx.git] / drivers / misc / sti / sti-netlink.c
index ca3533e75190b67c82888516895cc4517efe255e..dbd6a03ec207d3c4f6df17233f37b5142ac7413c 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/skbuff.h>
 #include <linux/mutex.h>
 #include <net/sock.h>
-#include <asm/arch/sti.h>
+#include <mach/sti.h>
 
 static struct sock *sti_sock;
 static DEFINE_MUTEX(sti_netlink_mutex);
@@ -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,8 @@ 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;
+       int ret = 0, len = 0;
 
        data    = NLMSG_DATA(nlh);
        chan    = (nlh->nlmsg_flags >> 8) & 0xff;
@@ -77,6 +80,7 @@ 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:
                data = kmalloc(size, GFP_KERNEL);
                if (!data)
@@ -88,6 +92,7 @@ static int sti_netlink_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
                                       data, len);
                kfree(data);
                break;
+#endif
        default:
                return -ENOTTY;
        }