|
@@ -95,7 +95,7 @@ struct s_pstats can_pstats; /* receive list statistics */
|
|
* af_can socket functions
|
|
* af_can socket functions
|
|
*/
|
|
*/
|
|
|
|
|
|
-static int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|
|
|
|
|
+int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|
{
|
|
{
|
|
struct sock *sk = sock->sk;
|
|
struct sock *sk = sock->sk;
|
|
|
|
|
|
@@ -108,6 +108,7 @@ static int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
|
|
return -ENOIOCTLCMD;
|
|
return -ENOIOCTLCMD;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+EXPORT_SYMBOL(can_ioctl);
|
|
|
|
|
|
static void can_sock_destruct(struct sock *sk)
|
|
static void can_sock_destruct(struct sock *sk)
|
|
{
|
|
{
|
|
@@ -698,13 +699,9 @@ int can_proto_register(struct can_proto *cp)
|
|
printk(KERN_ERR "can: protocol %d already registered\n",
|
|
printk(KERN_ERR "can: protocol %d already registered\n",
|
|
proto);
|
|
proto);
|
|
err = -EBUSY;
|
|
err = -EBUSY;
|
|
- } else {
|
|
|
|
|
|
+ } else
|
|
proto_tab[proto] = cp;
|
|
proto_tab[proto] = cp;
|
|
|
|
|
|
- /* use generic ioctl function if not defined by module */
|
|
|
|
- if (!cp->ops->ioctl)
|
|
|
|
- cp->ops->ioctl = can_ioctl;
|
|
|
|
- }
|
|
|
|
spin_unlock(&proto_tab_lock);
|
|
spin_unlock(&proto_tab_lock);
|
|
|
|
|
|
if (err < 0)
|
|
if (err < 0)
|