]> git.baikalelectronics.ru Git - kernel.git/commit
cdrom: don't attempt to fiddle with cdo->capability
authorJens Axboe <axboe@kernel.dk>
Sun, 14 Oct 2018 19:20:48 +0000 (13:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Sun, 14 Oct 2018 19:20:48 +0000 (13:20 -0600)
commit8442f3f28fba35c3d74119831135a3311286609b
treedfba0bd639cbedbd4c074155237a562d0efedd3f
parentc02b173d77cbdb519531727f4a8abc2db8ccf3a5
cdrom: don't attempt to fiddle with cdo->capability

We can't modify cdo->capability as it is defined as a const.
Change the modification hack to just WARN_ON_ONCE() if we hit
any of the invalid combinations.

This fixes a regression for pcd, which doesn't work after the
constify patch.

Fixes: 380b8f111a71 ("cdrom: Make device operations read-only")
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/cdrom/cdrom.c