aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/af_irda.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 6f92f9c62990..fbfa96754417 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -62,12 +62,12 @@
62 62
63static int irda_create(struct socket *sock, int protocol); 63static int irda_create(struct socket *sock, int protocol);
64 64
65static struct proto_ops irda_stream_ops; 65static const struct proto_ops irda_stream_ops;
66static struct proto_ops irda_seqpacket_ops; 66static const struct proto_ops irda_seqpacket_ops;
67static struct proto_ops irda_dgram_ops; 67static const struct proto_ops irda_dgram_ops;
68 68
69#ifdef CONFIG_IRDA_ULTRA 69#ifdef CONFIG_IRDA_ULTRA
70static struct proto_ops irda_ultra_ops; 70static const struct proto_ops irda_ultra_ops;
71#define ULTRA_MAX_DATA 382 71#define ULTRA_MAX_DATA 382
72#endif /* CONFIG_IRDA_ULTRA */ 72#endif /* CONFIG_IRDA_ULTRA */
73 73
@@ -1438,8 +1438,9 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1438 /* 1438 /*
1439 * POSIX 1003.1g mandates this order. 1439 * POSIX 1003.1g mandates this order.
1440 */ 1440 */
1441 if (sk->sk_err) 1441 ret = sock_error(sk);
1442 ret = sock_error(sk); 1442 if (ret)
1443 break;
1443 else if (sk->sk_shutdown & RCV_SHUTDOWN) 1444 else if (sk->sk_shutdown & RCV_SHUTDOWN)
1444 ; 1445 ;
1445 else if (noblock) 1446 else if (noblock)
@@ -1821,7 +1822,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1821 return -EINVAL; 1822 return -EINVAL;
1822 default: 1823 default:
1823 IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__); 1824 IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
1824 return dev_ioctl(cmd, (void __user *) arg); 1825 return -ENOIOCTLCMD;
1825 } 1826 }
1826 1827
1827 /*NOTREACHED*/ 1828 /*NOTREACHED*/
@@ -2463,7 +2464,7 @@ static struct net_proto_family irda_family_ops = {
2463 .owner = THIS_MODULE, 2464 .owner = THIS_MODULE,
2464}; 2465};
2465 2466
2466static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = { 2467static const struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
2467 .family = PF_IRDA, 2468 .family = PF_IRDA,
2468 .owner = THIS_MODULE, 2469 .owner = THIS_MODULE,
2469 .release = irda_release, 2470 .release = irda_release,
@@ -2484,7 +2485,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_stream_ops) = {
2484 .sendpage = sock_no_sendpage, 2485 .sendpage = sock_no_sendpage,
2485}; 2486};
2486 2487
2487static struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = { 2488static const struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
2488 .family = PF_IRDA, 2489 .family = PF_IRDA,
2489 .owner = THIS_MODULE, 2490 .owner = THIS_MODULE,
2490 .release = irda_release, 2491 .release = irda_release,
@@ -2505,7 +2506,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_seqpacket_ops) = {
2505 .sendpage = sock_no_sendpage, 2506 .sendpage = sock_no_sendpage,
2506}; 2507};
2507 2508
2508static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = { 2509static const struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
2509 .family = PF_IRDA, 2510 .family = PF_IRDA,
2510 .owner = THIS_MODULE, 2511 .owner = THIS_MODULE,
2511 .release = irda_release, 2512 .release = irda_release,
@@ -2527,7 +2528,7 @@ static struct proto_ops SOCKOPS_WRAPPED(irda_dgram_ops) = {
2527}; 2528};
2528 2529
2529#ifdef CONFIG_IRDA_ULTRA 2530#ifdef CONFIG_IRDA_ULTRA
2530static struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = { 2531static const struct proto_ops SOCKOPS_WRAPPED(irda_ultra_ops) = {
2531 .family = PF_IRDA, 2532 .family = PF_IRDA,
2532 .owner = THIS_MODULE, 2533 .owner = THIS_MODULE,
2533 .release = irda_release, 2534 .release = irda_release,