]> git.karo-electronics.de Git - linux-beck.git/commit
s390/dasd: Make use of dasd_set_feature() more often
authorJan Höppner <hoeppner@linux.vnet.ibm.com>
Fri, 7 Oct 2016 15:21:24 +0000 (17:21 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 28 Oct 2016 08:09:03 +0000 (10:09 +0200)
commit1081f3a70b74b90b6db60eb1ac6cc3c480d62d57
treeaa5f65286c5cbd566f27234d09c7386212697dad
parentce7a788f4d5aba3361572067c7ac7c4e85d4a070
s390/dasd: Make use of dasd_set_feature() more often

When setting certain attributes, we actually set the according feature
flag. Do this by using dasd_set_feature() at a few occurrences and
remove duplicate code.

In dasd_set_feature() dasd_find_busid() is used to retrieve the devmap
for the device in question. Combined with the change above, this would
require the device to be set online at least once so that a devmap is
being created. Change that by using dasd_devmap_from_cdev() instead,
which uses dasd_find_busid() first and will create a devmap accordingly
if there is none yet.

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_devmap.c