Commit be583732 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Christoph Hellwig

[NET]: Kill extraneous CONFIG_{NET,KMOD} in net/socket.c

parent 4f78b8d1
...@@ -79,10 +79,7 @@ ...@@ -79,10 +79,7 @@
#include <linux/mount.h> #include <linux/mount.h>
#include <linux/security.h> #include <linux/security.h>
#include <linux/compat.h> #include <linux/compat.h>
#if defined(CONFIG_KMOD) && defined(CONFIG_NET)
#include <linux/kmod.h> #include <linux/kmod.h>
#endif
#ifdef CONFIG_NET_RADIO #ifdef CONFIG_NET_RADIO
#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */ #include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
...@@ -770,11 +767,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -770,11 +767,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unlock_kernel(); unlock_kernel();
sock = SOCKET_I(inode); sock = SOCKET_I(inode);
#ifdef CONFIG_NET
if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void *)arg);
} else } else
#endif /* CONFIG_NET */
#ifdef WIRELESS_EXT #ifdef WIRELESS_EXT
if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
err = dev_ioctl(cmd, (void *)arg); err = dev_ioctl(cmd, (void *)arg);
...@@ -795,11 +790,8 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -795,11 +790,8 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case SIOCGIFBR: case SIOCGIFBR:
case SIOCSIFBR: case SIOCSIFBR:
err = -ENOPKG; err = -ENOPKG;
#ifdef CONFIG_KMOD
if (!br_ioctl_hook) if (!br_ioctl_hook)
request_module("bridge"); request_module("bridge");
#endif
down(&br_ioctl_mutex); down(&br_ioctl_mutex);
if (br_ioctl_hook) if (br_ioctl_hook)
...@@ -809,10 +801,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -809,10 +801,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case SIOCGIFVLAN: case SIOCGIFVLAN:
case SIOCSIFVLAN: case SIOCSIFVLAN:
err = -ENOPKG; err = -ENOPKG;
#ifdef CONFIG_KMOD
if (!vlan_ioctl_hook) if (!vlan_ioctl_hook)
request_module("8021q"); request_module("8021q");
#endif
down(&vlan_ioctl_mutex); down(&vlan_ioctl_mutex);
if (vlan_ioctl_hook) if (vlan_ioctl_hook)
err = vlan_ioctl_hook(arg); err = vlan_ioctl_hook(arg);
...@@ -826,10 +817,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd, ...@@ -826,10 +817,9 @@ static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case SIOCADDDLCI: case SIOCADDDLCI:
case SIOCDELDLCI: case SIOCDELDLCI:
err = -ENOPKG; err = -ENOPKG;
#ifdef CONFIG_KMOD
if (!dlci_ioctl_hook) if (!dlci_ioctl_hook)
request_module("dlci"); request_module("dlci");
#endif
if (dlci_ioctl_hook) { if (dlci_ioctl_hook) {
down(&dlci_ioctl_mutex); down(&dlci_ioctl_mutex);
err = dlci_ioctl_hook(cmd, (void *)arg); err = dlci_ioctl_hook(cmd, (void *)arg);
...@@ -1021,7 +1011,7 @@ int sock_create(int family, int type, int protocol, struct socket **res) ...@@ -1021,7 +1011,7 @@ int sock_create(int family, int type, int protocol, struct socket **res)
if (err) if (err)
return err; return err;
#if defined(CONFIG_KMOD) && defined(CONFIG_NET) #if defined(CONFIG_KMOD)
/* Attempt to load a protocol module if the find failed. /* Attempt to load a protocol module if the find failed.
* *
* 12/09/1996 Marcin: But! this makes REALLY only sense, if the user * 12/09/1996 Marcin: But! this makes REALLY only sense, if the user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment