]> git.baikalelectronics.ru Git - kernel.git/commit
sg: simplify procfs code
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Apr 2018 09:26:22 +0000 (11:26 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 May 2018 05:24:30 +0000 (07:24 +0200)
commitde114f8a68057969eb02dd014c2dd7afbc6c3b7e
tree90b92ddd659978127706a748b378985945c727af
parent7fe4d98aa437b4246c06ba879370c89c61212e30
sg: simplify procfs code

Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls.  Switch to use
proc_create_seq where applicable.

Also don't bother handling proc_create* failures - the driver works
perfectly fine without the proc files, and the cleanup will handle
missing files gracefully.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/sg.c