USB: use MII hooks only if CONFIG_MII is enabled
authorDavid Brownell <david-b@pacbell.net>
Thu, 2 Nov 2006 20:29:12 +0000 (12:29 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Nov 2006 19:57:19 +0000 (11:57 -0800)
commit18ee91fa9815fa3bb4e51cdcb8229bd0a0f11a70
treee1725a4cc51c73007b14045e548956b490d4b694
parent9b823b43ff308c914530ec7fde5e2d79cb37b51a
USB: use MII hooks only if CONFIG_MII is enabled

Fix mcs7830 patch

The recent mcs7830 update to make the MII support sharable goofed various
pre-existing configurations in two ways:

  - it made the usbnet infrastructure reference MII symbols even
    when they're not needed in the kernel being built

  - it didn't enable MII along with the mcs7830 minidriver

This patch fixes these two problems.

However, there does seem to be a Kconfig reverse dependency bug in that MII
gets wrongly enabled in some cases (like USBNET=y and USBNET_MII=n); I think
I've noticed that same problem in other situations too.  So the result can
mean kernels being bloated by stuff that's needlessly enabled ... better
than wrongly being disabled, but contributing to bloat.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/net/Kconfig
drivers/usb/net/usbnet.c