The previous patches in this series have changed the behaviour of the
driver and added new calls.
Signed-off-by: Dave Penkler <dpenkler@xxxxxxxxx>
Reviewed-by: Guido Kiener <guido.kiener@xxxxxxxxxxxxxxxxx>
Tested-by: Jian-Wei Wu <jian-wei_wu@xxxxxxxxxxxx>
---
drivers/usb/class/usbtmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index d2fcc698c745..74d5a9c5238a 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -25,7 +25,7 @@
/* Increment API VERSION when changing tmc.h with new flags or ioctls
* or when changing a significant behavior of the driver.
*/
-#define USBTMC_API_VERSION (2)
+#define USBTMC_API_VERSION (3)
Why is this needed? You should be able to detect new calls by just
doing the ioctl and checking right?
The ioctl USBTMC488_IOCTL_READ_STB has changed the processing of the status
byte. The majority of users will not detect a difference, but we have learned
that every change can break a specific application of some users.
Now we think we have the correct and best implementation for the ioctl
USBTMC488_IOCTL_READ_STB and it will make most users happy.
Nevertheless we have added two ioctls that give people a chance to read
the bare status byte and service request for optimizing their applications
or to communicate with their non conformant USB488 devices.
Knowing the USBTMC_API_VERSION give users a chance to create an effective
workaround (e.g. calling the ioctl USBTMC488_IOCTL_READ_STB twice).
I'll take this for now, but versioning apis is not a good thing to
do in general.
Thank you. Yes, checking the existence of other ioctl is an alternative way
to determine the behavior of the driver. But I think increasing the API
version gives more clarity when people want to trace back the changed
behavior.
Currently we do not plan further extensions to the USBTMC driver.
Regards,
Guido