Skip to content

Commit

Permalink
Checkpatch and clang-format style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
klogg committed Sep 11, 2024
1 parent 8271aaa commit cb843a4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
11 changes: 5 additions & 6 deletions fl2000_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,12 @@ static struct component_master_ops fl2000_master_ops = {
/**
* Will only allocate structures on 'probe' function call. There is still no bridge at this moment,
* so registration of the device and modesetting does not make any sense.
*
*
* We do not configure DMA mask here because we link DRM device to the USB device provided.
* We also do not set up polling because connect/disconnect events are provided in interrupts.
*
*
* @param usb_dev USB device structure
*
*
* @return 0 on success, negative value on error
*/
int fl2000_drm_init(struct usb_device *usb_dev)
Expand All @@ -560,7 +560,6 @@ int fl2000_drm_init(struct usb_device *usb_dev)
struct drm_mode_config *mode_config;
struct component_match *match = NULL;

/* DRM device is allocated together with private data structure and attached to the device */
drm_if = devm_drm_dev_alloc(&usb_dev->dev, &fl2000_drm_driver, struct fl2000_drm_if, drm);
if (IS_ERR(drm_if)) {
dev_err(&usb_dev->dev, "Cannot allocate DRM structure (%ld)", PTR_ERR(drm_if));
Expand Down Expand Up @@ -616,8 +615,8 @@ int fl2000_drm_init(struct usb_device *usb_dev)
drm_dev_put(drm);
return -ENODEV;
}
/* Register component master - component bind/unbind functions will complete the registration
* and initializtion of DRM device chain
/* Register component master - component bind/unbind functions will complete the
* registration and initializtion of DRM device chain
*/
ret = component_master_add_with_match(&usb_dev->dev, &fl2000_master_ops, match);
if (ret) {
Expand Down
2 changes: 1 addition & 1 deletion fl2000_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define FL2000_USB_INTERFACE(ifnum, table) \
{ \
USB_DEVICE_INTERFACE_NUMBER(FL2000_USB_VENDOR, FL2000_USB_PRODUCT, ifnum), \
.driver_info = (kernel_ulong_t) & (table) \
.driver_info = (kernel_ulong_t)(table) \
}

struct fl2000_if_api {
Expand Down
12 changes: 6 additions & 6 deletions fl2000_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ static void fl2000_intr_release(struct device *dev, void *res)

/**
* fl2000_enable_interrupt() - interrupt processing start
*
*
* @usb_dev: USB device
*
*
* @returns: Operation result
*/
int fl2000_enable_interrupt(struct usb_device *usb_dev)
Expand All @@ -75,7 +75,7 @@ int fl2000_enable_interrupt(struct usb_device *usb_dev)
* fl2000_disable_interrupt() - interrupt processing stop
*
* @usb_dev: USB device
*
*
* @returns: Operation result
*/
int fl2000_disable_interrupt(struct usb_device *usb_dev)
Expand All @@ -93,9 +93,9 @@ int fl2000_disable_interrupt(struct usb_device *usb_dev)

/**
* fl2000_interrupt_create() - interrupt processing context creation
*
*
* @interface: USB interrupt transfers interface
*
*
* @returns: Operation result
*/
int fl2000_interrupt_create(struct usb_interface *interface)
Expand Down Expand Up @@ -127,7 +127,7 @@ int fl2000_interrupt_create(struct usb_interface *interface)

/**
* fl2000_interrupt_destroy() - interrupt processing context destruction
*
*
* @interface: USB interrupt transfers interface
*/
void fl2000_interrupt_destroy(struct usb_interface *interface)
Expand Down
24 changes: 13 additions & 11 deletions fl2000_streaming.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ static int fl2000_send_stream(struct usb_device *usb_dev, struct fl2000_stream *
usb_unanchor_urb(urb);
usb_free_urb(urb);

/* NOTE: actually in some cases we can try and resend the URB (-EAGAIN, some -ENOMEM) */
/* NOTE: actually in some cases we can try and resend the URB after sleep
* e.g. -EAGAIN, few attempts on -ENOMEM... We will need work for this
*/
return ret;
}
} while (atomic_dec_and_test(&stream->urb_cnt));
Expand Down Expand Up @@ -289,7 +291,7 @@ static void fl2000_streaming_release(struct device *dev, void *res)

/**
* fl2000_streaming_compress() - compress XRGB888 data to RGB565 or RGB888
*
*
* @usb_dev: USB device
* @src: Source buffer
* @height: Image height
Expand Down Expand Up @@ -340,11 +342,11 @@ void fl2000_streaming_compress(struct usb_device *usb_dev, void *src, unsigned i

/**
* fl2000_streaming_mode_set() - streaming mode setup
*
*
* @usb_dev: USB device
* @pixels: Number of pixels in a line
* @bytes_pix: Bytes per pixel
*
*
* @returns: Operation result
*/
int fl2000_streaming_mode_set(struct usb_device *usb_dev, int pixels, u32 bytes_pix)
Expand Down Expand Up @@ -381,9 +383,9 @@ int fl2000_streaming_mode_set(struct usb_device *usb_dev, int pixels, u32 bytes_

/**
* fl2000_streaming_enable() - streaming processing start
*
*
* @usb_dev: USB device
*
*
* @returns: Operation result
*/
int fl2000_streaming_enable(struct usb_device *usb_dev)
Expand Down Expand Up @@ -416,7 +418,7 @@ int fl2000_streaming_enable(struct usb_device *usb_dev)

/**
* fl2000_streaming_disable() - streaming processing stop
*
*
* @usb_dev: USB device
*/
void fl2000_streaming_disable(struct usb_device *usb_dev)
Expand Down Expand Up @@ -451,12 +453,12 @@ void fl2000_streaming_disable(struct usb_device *usb_dev)

/**
* fl2000_streaming_create() - streaming processing context creation
*
*
* It shall not initiate any USB transfers. URB is not allocated here because we do not know the
* stream requirements yet.
*
*
* @interface: streaming transfers interface
*
*
* @returns: Operation result
*/
int fl2000_streaming_create(struct usb_interface *interface)
Expand Down Expand Up @@ -486,7 +488,7 @@ int fl2000_streaming_create(struct usb_interface *interface)

/**
* fl2000_streaming_destroy() - streaming processing context destruction
*
*
* @interface: streaming transfers interface
*/
void fl2000_streaming_destroy(struct usb_interface *interface)
Expand Down

0 comments on commit cb843a4

Please sign in to comment.