Revert "ppdev: use new parport device model"
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Mar 2016 16:02:13 +0000 (09:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Mar 2016 16:02:13 +0000 (09:02 -0700)
commit1701f680407c6cc05121566cef5293d33881fe71
treebf9e537a9a36ba066f6f1b25e6bde58c35516706
parent3b3b3bd97788e1f574c71f865d8465b00a6b8708
Revert "ppdev: use new parport device model"

This reverts commit e7223f18603374d235d8bb0398532323e5f318b9.

It causes problems when a ppdev tries to register before the parport
driver has been registered with the device model. That will trigger the

        BUG_ON(!drv->bus->p);

at drivers/base/driver.c:153. The call chain is

  kernel_init ->
    kernel_init_freeable ->
      do_one_initcall ->
        ppdev_init ->
          __parport_register_driver ->
            driver_register *BOOM*

Reported-by: kernel test robot <fengguang.wu@intel.com>
Reported-by: Ross Zwisler <zwisler@gmail.com>
Reported-by: Petr Mladek <pmladek@suse.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/ppdev.c