mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
bsg: provide bsg_remove_queue() helper
All drivers do unregister + cleanup, provide a helper for that. Cc: [email protected] Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Tested-by: Benjamin Block <[email protected]> Tested-by: Ming Lei <[email protected]> Reviewed-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
aae3b069d5
commit
5e28b8d8a1
6 changed files with 14 additions and 14 deletions
|
|
@ -296,6 +296,15 @@ static void bsg_exit_rq(struct request_queue *q, struct request *req)
|
|||
kfree(job->reply);
|
||||
}
|
||||
|
||||
void bsg_remove_queue(struct request_queue *q)
|
||||
{
|
||||
if (q) {
|
||||
bsg_unregister_queue(q);
|
||||
blk_cleanup_queue(q);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(bsg_remove_queue);
|
||||
|
||||
/**
|
||||
* bsg_setup_queue - Create and add the bsg hooks so we can receive requests
|
||||
* @dev: device to attach bsg device to
|
||||
|
|
|
|||
Loading…
Reference in a new issue