From dc5bc0cabd1003b4fa358f0d54dfdc46585efb57 Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Wed, 20 Jun 2007 13:00:20 +0200 Subject: s390: Use ccw_device_get_id() in qeth/claw drivers Use ccw_device_get_id() to get a device number instead of parsing the ccw device's bus id. Signed-off-by: Cornelia Huck Signed-off-by: Frank Pavlic Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'drivers/s390/net/qeth_main.c') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 79b7379a784..86b0c44165c 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -2176,13 +2176,6 @@ qeth_ulp_enable(struct qeth_card *card) } -static inline __u16 -__raw_devno_from_bus_id(char *id) -{ - id += (strlen(id) - 4); - return (__u16) simple_strtoul(id, &id, 16); -} - static int qeth_ulp_setup_cb(struct qeth_card *card, struct qeth_reply *reply, unsigned long data) @@ -2205,6 +2198,7 @@ qeth_ulp_setup(struct qeth_card *card) int rc; __u16 temp; struct qeth_cmd_buffer *iob; + struct ccw_dev_id dev_id; QETH_DBF_TEXT(setup,2,"ulpsetup"); @@ -2218,8 +2212,8 @@ qeth_ulp_setup(struct qeth_card *card) memcpy(QETH_ULP_SETUP_FILTER_TOKEN(iob->data), &card->token.ulp_filter_r, QETH_MPC_TOKEN_LENGTH); - temp = __raw_devno_from_bus_id(CARD_DDEV_ID(card)); - memcpy(QETH_ULP_SETUP_CUA(iob->data), &temp, 2); + ccw_device_get_id(CARD_DDEV(card), &dev_id); + memcpy(QETH_ULP_SETUP_CUA(iob->data), &dev_id.devno, 2); temp = (card->info.cula << 8) + card->info.unit_addr2; memcpy(QETH_ULP_SETUP_REAL_DEVADDR(iob->data), &temp, 2); rc = qeth_send_control_data(card, ULP_SETUP_SIZE, iob, -- cgit v1.2.3-70-g09d2