aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/lcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r--drivers/s390/net/lcs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 07a25c3f94b6..8c675905448b 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -1936,7 +1936,7 @@ lcs_portno_show (struct device *dev, struct device_attribute *attr, char *buf)
1936{ 1936{
1937 struct lcs_card *card; 1937 struct lcs_card *card;
1938 1938
1939 card = (struct lcs_card *)dev->driver_data; 1939 card = dev_get_drvdata(dev);
1940 1940
1941 if (!card) 1941 if (!card)
1942 return 0; 1942 return 0;
@@ -1953,7 +1953,7 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char
1953 struct lcs_card *card; 1953 struct lcs_card *card;
1954 int value; 1954 int value;
1955 1955
1956 card = (struct lcs_card *)dev->driver_data; 1956 card = dev_get_drvdata(dev);
1957 1957
1958 if (!card) 1958 if (!card)
1959 return 0; 1959 return 0;
@@ -1987,7 +1987,7 @@ lcs_timeout_show(struct device *dev, struct device_attribute *attr, char *buf)
1987{ 1987{
1988 struct lcs_card *card; 1988 struct lcs_card *card;
1989 1989
1990 card = (struct lcs_card *)dev->driver_data; 1990 card = dev_get_drvdata(dev);
1991 1991
1992 return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; 1992 return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0;
1993} 1993}
@@ -1998,7 +1998,7 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char
1998 struct lcs_card *card; 1998 struct lcs_card *card;
1999 int value; 1999 int value;
2000 2000
2001 card = (struct lcs_card *)dev->driver_data; 2001 card = dev_get_drvdata(dev);
2002 2002
2003 if (!card) 2003 if (!card)
2004 return 0; 2004 return 0;
@@ -2017,7 +2017,7 @@ static ssize_t
2017lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, 2017lcs_dev_recover_store(struct device *dev, struct device_attribute *attr,
2018 const char *buf, size_t count) 2018 const char *buf, size_t count)
2019{ 2019{
2020 struct lcs_card *card = dev->driver_data; 2020 struct lcs_card *card = dev_get_drvdata(dev);
2021 char *tmp; 2021 char *tmp;
2022 int i; 2022 int i;
2023 2023
@@ -2070,7 +2070,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev)
2070 put_device(&ccwgdev->dev); 2070 put_device(&ccwgdev->dev);
2071 return ret; 2071 return ret;
2072 } 2072 }
2073 ccwgdev->dev.driver_data = card; 2073 dev_set_drvdata(&ccwgdev->dev, card);
2074 ccwgdev->cdev[0]->handler = lcs_irq; 2074 ccwgdev->cdev[0]->handler = lcs_irq;
2075 ccwgdev->cdev[1]->handler = lcs_irq; 2075 ccwgdev->cdev[1]->handler = lcs_irq;
2076 card->gdev = ccwgdev; 2076 card->gdev = ccwgdev;
@@ -2087,7 +2087,7 @@ lcs_register_netdev(struct ccwgroup_device *ccwgdev)
2087 struct lcs_card *card; 2087 struct lcs_card *card;
2088 2088
2089 LCS_DBF_TEXT(2, setup, "regnetdv"); 2089 LCS_DBF_TEXT(2, setup, "regnetdv");
2090 card = (struct lcs_card *)ccwgdev->dev.driver_data; 2090 card = dev_get_drvdata(&ccwgdev->dev);
2091 if (card->dev->reg_state != NETREG_UNINITIALIZED) 2091 if (card->dev->reg_state != NETREG_UNINITIALIZED)
2092 return 0; 2092 return 0;
2093 SET_NETDEV_DEV(card->dev, &ccwgdev->dev); 2093 SET_NETDEV_DEV(card->dev, &ccwgdev->dev);
@@ -2120,7 +2120,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
2120 enum lcs_dev_states recover_state; 2120 enum lcs_dev_states recover_state;
2121 int rc; 2121 int rc;
2122 2122
2123 card = (struct lcs_card *)ccwgdev->dev.driver_data; 2123 card = dev_get_drvdata(&ccwgdev->dev);
2124 if (!card) 2124 if (!card)
2125 return -ENODEV; 2125 return -ENODEV;
2126 2126
@@ -2226,7 +2226,7 @@ __lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode)
2226 int ret; 2226 int ret;
2227 2227
2228 LCS_DBF_TEXT(3, setup, "shtdndev"); 2228 LCS_DBF_TEXT(3, setup, "shtdndev");
2229 card = (struct lcs_card *)ccwgdev->dev.driver_data; 2229 card = dev_get_drvdata(&ccwgdev->dev);
2230 if (!card) 2230 if (!card)
2231 return -ENODEV; 2231 return -ENODEV;
2232 if (recovery_mode == 0) { 2232 if (recovery_mode == 0) {
@@ -2293,7 +2293,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev)
2293{ 2293{
2294 struct lcs_card *card; 2294 struct lcs_card *card;
2295 2295
2296 card = (struct lcs_card *)ccwgdev->dev.driver_data; 2296 card = dev_get_drvdata(&ccwgdev->dev);
2297 if (!card) 2297 if (!card)
2298 return; 2298 return;
2299 2299