Re: [PATCH 2/3] Add Opticon OPN2001 write support

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

 



Hello.

On 10/10/10 16:34, Greg KH wrote:

OPN2001 expects write operations to arrive as a vendor-specific command
through the control pipe (instead of using a separate bulk-out pipe).

Signed-off-by: Alon Ziv<alon-git@xxxxxxxxxxx>
---
   drivers/usb/serial/opticon.c |   30 ++++++++++++++++++++++++++----
   1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 9ff19c8..4fe7c3d 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
[...]

+	} else {
+		struct usb_ctrlrequest *dr;
+
+		dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);

    sizeof(*dr) is a preferred form.

No, people disagree on this, there is no 'preferred' form, you are free
to use either way.

Please refer to the CodingStyle chapter 14. This is preferred form, according to it...

WBR, Sergei

--
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