From c3521254b16dbd270e194f81aa2cbdbcd6cc9f18 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Fri, 16 Jan 2015 14:05:47 +0100 Subject: qeth: use qeth_card_hw_is_reachable() everywhere qeth_card_hw_is_reachable() was introduced as part of a new functionality, but it is a useful abstraction that can replace verbose checks througout the rest of the `qeth` driver. Signed-off-by: Eugene Crosser Signed-off-by: Ursula Braun Reviewed-by: Thomas-Mich Richter Signed-off-by: David S. Miller --- drivers/s390/net/qeth_l3_sys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/s390/net/qeth_l3_sys.c') diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index adef5f5de118..c4dcd667c894 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c @@ -78,8 +78,7 @@ static ssize_t qeth_l3_dev_route_store(struct qeth_card *card, rc = -EINVAL; goto out; } - if (((card->state == CARD_STATE_SOFTSETUP) || - (card->state == CARD_STATE_UP)) && + if (qeth_card_hw_is_reachable(card) && (old_route_type != route->type)) { if (prot == QETH_PROT_IPV4) rc = qeth_l3_setrouting_v4(card); -- cgit v1.2.3