usb: On a "usb reset" call usb_kbd_deregister() before calling usb_stop()

We need to call usb_kbd_deregister() before calling usb_stop().

usbkbd's stdio_dev->priv points to the usb_device, and usb_kbd_testc
dereferences usb_device->privptr.

usb_stop zeros usb_device, leaving usb_device->privptr NULL, causing
bad things (tm) to happen once control returns to the main loop and
usb_kbd_testc gets called.

Calling usb_kbd_deregister() avoids this. Note that we do not allow
the "usb reset" to continue when the deregister fails. This will be fixed
in a later patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
stdio: Add force parameter to stdio_deregister

In some cases we really want to move forward with a deregister, add a force
parameter to allow this, and replace the dev with a nulldev in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
foo
usb_kbd: Remove (broken) check for already being registered

We now always properly deregister the keyboard before calling
drv_usb_kbd_init(), so we can drop the check for already being registered.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
usb: usb_kbd_deregister: Do not treat -ENODEV as an error

ENODEV menas no usb keyboard was registered, threat this as a successful
usb_kbd_deregister.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>