Commit abf8e9a2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fix uss720 driver to work properly with recent parport changes.

parent ff238d67
...@@ -493,54 +493,42 @@ static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer ...@@ -493,54 +493,42 @@ static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer
return rlen; return rlen;
} }
void parport_uss720_inc_use_count(void)
{
MOD_INC_USE_COUNT;
}
void parport_uss720_dec_use_count(void)
{
MOD_DEC_USE_COUNT;
}
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
static struct parport_operations parport_uss720_ops = static struct parport_operations parport_uss720_ops =
{ {
parport_uss720_write_data, .owner = THIS_MODULE,
parport_uss720_read_data, .write_data = parport_uss720_write_data,
.read_data = parport_uss720_read_data,
parport_uss720_write_control,
parport_uss720_read_control,
parport_uss720_frob_control,
parport_uss720_read_status, .write_control = parport_uss720_write_control,
.read_control = parport_uss720_read_control,
.frob_control = parport_uss720_frob_control,
parport_uss720_enable_irq, .read_status = parport_uss720_read_status,
parport_uss720_disable_irq,
parport_uss720_data_forward, .enable_irq = parport_uss720_enable_irq,
parport_uss720_data_reverse, .disable_irq = parport_uss720_disable_irq,
parport_uss720_init_state, .data_forward = parport_uss720_data_forward,
parport_uss720_save_state, .data_reverse = parport_uss720_data_reverse,
parport_uss720_restore_state,
parport_uss720_inc_use_count, .init_state = parport_uss720_init_state,
parport_uss720_dec_use_count, .save_state = parport_uss720_save_state,
.restore_state = parport_uss720_restore_state,
parport_uss720_epp_write_data, .epp_write_data = parport_uss720_epp_write_data,
parport_uss720_epp_read_data, .epp_read_data = parport_uss720_epp_read_data,
parport_uss720_epp_write_addr, .epp_write_addr = parport_uss720_epp_write_addr,
parport_uss720_epp_read_addr, .epp_read_addr = parport_uss720_epp_read_addr,
parport_uss720_ecp_write_data, .ecp_write_data = parport_uss720_ecp_write_data,
parport_uss720_ecp_read_data, .ecp_read_data = parport_uss720_ecp_read_data,
parport_uss720_ecp_write_addr, .ecp_write_addr = parport_uss720_ecp_write_addr,
parport_uss720_write_compat, .compat_write_data = parport_uss720_write_compat,
parport_ieee1284_read_nibble, .nibble_read_data = parport_ieee1284_read_nibble,
parport_ieee1284_read_byte, .byte_read_data = parport_ieee1284_read_byte,
}; };
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
...@@ -607,7 +595,6 @@ static int uss720_probe(struct usb_interface *intf, ...@@ -607,7 +595,6 @@ static int uss720_probe(struct usb_interface *intf,
parport_proc_register(pp); parport_proc_register(pp);
parport_announce_port(pp); parport_announce_port(pp);
MOD_INC_USE_COUNT;
usb_set_intfdata (intf, pp); usb_set_intfdata (intf, pp);
return 0; return 0;
...@@ -635,7 +622,6 @@ static void uss720_disconnect(struct usb_interface *intf) ...@@ -635,7 +622,6 @@ static void uss720_disconnect(struct usb_interface *intf)
parport_proc_unregister(pp); parport_proc_unregister(pp);
parport_unregister_port(pp); parport_unregister_port(pp);
kfree(priv); kfree(priv);
MOD_DEC_USE_COUNT;
} }
} }
...@@ -652,6 +638,7 @@ MODULE_DEVICE_TABLE (usb, uss720_table); ...@@ -652,6 +638,7 @@ MODULE_DEVICE_TABLE (usb, uss720_table);
static struct usb_driver uss720_driver = { static struct usb_driver uss720_driver = {
.owner = THIS_MODULE,
.name = "uss720", .name = "uss720",
.probe = uss720_probe, .probe = uss720_probe,
.disconnect = uss720_disconnect, .disconnect = uss720_disconnect,
......
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