Re: [PATCH] [RFC] USB: EHCI: mark several functions as maybe unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On the other hand, clear_tt_buffer_complete is never called if the
driver isn't EHCI.  Consequently there's no real need for a NULL check.
If you send in a patch removing that check, I'll ACK it.  (Provided you
also doublecheck all the other in-tree drivers to make sure the pointer
entry is present.)

Possibly something like usb-serial.c's set_to_generic_if_null() could be used here when (type == EHCI) to prevent future omissions:

#define set_to_generic_if_null(type, function)				\
	do {								\
		if (!type->function) {					\
			type->function = usb_serial_generic_##function;	\
			dbg("Had to override the " #function		\
				" usb serial operation with the generic one.");\
			}						\
	} while (0)

But then in this case perhaps a dev_err() would be more appropriate?

The omission of clear_tt_buffer_complete and endpoint_reset resulted in usb-serial devices like ftdi_sio only working correctly the first time they were being opened. More info in my msg "[PATCH][RFC] USB: EHCI: add missing {endpoint_reset,clear_tt_buffer_complete} operations" posted earlier.

grtz,
Jurgen


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux