aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/buffer.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <[email protected]>2020-10-19 10:06:41 +0000
committerGreg Kroah-Hartman <[email protected]>2020-10-28 11:32:59 +0000
commit41631d3616c36305fef7c0e2e6412538a915dc97 (patch)
tree56ba300a5bd607da3533a968ea0af14e9a89df07 /drivers/usb/core/buffer.c
parentusb: gadget: udc: Remove in_interrupt()/in_irq() from comments (diff)
downloadkernel-41631d3616c36305fef7c0e2e6412538a915dc97.tar.gz
kernel-41631d3616c36305fef7c0e2e6412538a915dc97.zip
usb: core: Replace in_interrupt() in comments
The usage of in_interrupt() in drivers is phased out for various reasons. Various comments use !in_interrupt() to describe calling context for functions which might sleep. That's wrong because the calling context has to be preemptible task context, which is not what !in_interrupt() describes. Replace !in_interrupt() with more accurate plain text descriptions. The comment for usb_hcd_poll_rh_status() is misleading as this function is called from all kinds of contexts including preemptible task context. Remove it as there is obviously no restriction. Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/buffer.c')
-rw-r--r--drivers/usb/core/buffer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index 6cf22c27f2d2..fbb087b728dc 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -51,7 +51,8 @@ void __init usb_init_pool_max(void)
/**
* hcd_buffer_create - initialize buffer pools
* @hcd: the bus whose buffer pools are to be initialized
- * Context: !in_interrupt()
+ *
+ * Context: task context, might sleep
*
* Call this as part of initializing a host controller that uses the dma
* memory allocators. It initializes some pools of dma-coherent memory that
@@ -88,7 +89,8 @@ int hcd_buffer_create(struct usb_hcd *hcd)
/**
* hcd_buffer_destroy - deallocate buffer pools
* @hcd: the bus whose buffer pools are to be destroyed
- * Context: !in_interrupt()
+ *
+ * Context: task context, might sleep
*
* This frees the buffer pools created by hcd_buffer_create().
*/