flexcop: unneeded ATOMIC
PATCH 1/2 flexcop: unneeded ATOMIC
No need for GFP_ATOMIC during probe()
--- drivers/media/usb/b2c2/flexcop-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/b2c2/flexcop-usb.c +2 -2
@@ -446,7 +446,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)/* creating iso urbs */ for (i =0 ; i <B2C2_USB_NUM_ISO_URB ; i++) { fc_usb->iso_urb[i] =usb_alloc_urb (B2C2_USB_FRAMES_PER_ISO , -GFP_ATOMIC ); +GFP_KERNEL );if (fc_usb->iso_urb[i] ==NULL ) { ret = -ENOMEM ; goto urb_error;
@@ -479,7 +479,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) frame_offset += frame_size; } -if ((ret =usb_submit_urb (fc_usb->iso_urb[i],GFP_ATOMIC ))) { +if ((ret =usb_submit_urb (fc_usb->iso_urb[i],GFP_KERNEL ))) {err ("submitting urb %d failed with %d." , i, ret); goto urb_error; }
Signature · 1 line
2.35.3
PATCH 2/2 flexcop: allow for modern speeds
High speed is no longer the ultimate in speed.
--- drivers/media/usb/b2c2/flexcop-usb.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/media/usb/b2c2/flexcop-usb.c +6 -0
@@ -525,6 +525,12 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)case USB_SPEED_HIGH :info ("running at HIGH speed." );break ; +case USB_SPEED_SUPER : +info ("running at SUPER speed." ); +break ; +case USB_SPEED_SUPER_PLUS : +info ("running at SUPER+ speed." ); +break ;case USB_SPEED_UNKNOWN :default :err ("cannot handle USB speed because it is unknown." );
Signature · 1 line
2.35.3
Re: [PATCH 2/2] flexcop: allow for modern speeds
Quoted 12 lines · Oliver Neukum
High speed is no longer the ultimate in speed.
Signed-off-by Oliver Neukum <[email protected]>--- drivers/media/usb/b2c2/flexcop-usb.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/media/usb/b2c2/flexcop-usb.c +0
-0
drivers/media/usb/b2c2/flexcop-usb.c static int flexcop_usb_init(struct flexcop_usb *fc_usb) · line 533
Quoted 9 lines
drivers/media/usb/b2c2/flexcop-usb.c +6
-0@@ -525,6 +525,12 @@ static int flexcop_usb_init(struct flexcop_usb *fc_usb)case USB_SPEED_HIGH :info ("running at HIGH speed." );break ; +case USB_SPEED_SUPER : +info ("running at SUPER speed." ); +break ; +case USB_SPEED_SUPER_PLUS : +info ("running at SUPER+ speed." ); +break ;
Not sure this change is warranted, though. These devices aren't going to start supporting SuperSpeed.
drivers/media/usb/b2c2/flexcop-usb.c static int flexcop_usb_init(struct flexcop_usb *fc_usb) · line 536
Quoted 3 lines
drivers/media/usb/b2c2/flexcop-usb.c +0
-0case USB_SPEED_UNKNOWN :default :err ("cannot handle USB speed because it is unknown." );
Johan
Quoted 1 line · Oliver Neukum
No need for
GFP_ATOMICduringprobe()
Please add a "media: " prefix and use a verb (e.g. "replace") in Subject.
Quoted 19 lines
Signed-off-by Oliver Neukum <[email protected]>--- drivers/media/usb/b2c2/flexcop-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/usb/b2c2/flexcop-usb.c +1
-1@@ -446,7 +446,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)/* creating iso urbs */ for (i =0 ; i <B2C2_USB_NUM_ISO_URB ; i++) { fc_usb->iso_urb[i] =usb_alloc_urb (B2C2_USB_FRAMES_PER_ISO , -GFP_ATOMIC ); +GFP_KERNEL );if (fc_usb->iso_urb[i] ==NULL ) { ret = -ENOMEM ; goto urb_error;
drivers/media/usb/b2c2/flexcop-usb.c static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) · line 482
Quoted 5 lines
drivers/media/usb/b2c2/flexcop-usb.c +1
-1@@ -479,7 +479,7 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) frame_offset += frame_size; } -if ((ret =usb_submit_urb (fc_usb->iso_urb[i],GFP_ATOMIC ))) { +if ((ret =usb_submit_urb (fc_usb->iso_urb[i],GFP_KERNEL ))) {
And add the missing space after the comma here.
drivers/media/usb/b2c2/flexcop-usb.c static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) · line 485
Quoted 3 lines
drivers/media/usb/b2c2/flexcop-usb.c +0
-0err ("submitting urb %d failed with %d." , i, ret); goto urb_error; }
Change itself looks good otherwise.
Johan