diff options
Diffstat (limited to 'drivers/s390/net/lcs.c')
-rw-r--r-- | drivers/s390/net/lcs.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index a45bc24eb5f9..ba6d45d29ad4 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1939,7 +1939,7 @@ lcs_portno_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
1939 | { | 1939 | { |
1940 | struct lcs_card *card; | 1940 | struct lcs_card *card; |
1941 | 1941 | ||
1942 | card = (struct lcs_card *)dev->driver_data; | 1942 | card = dev_get_drvdata(dev); |
1943 | 1943 | ||
1944 | if (!card) | 1944 | if (!card) |
1945 | return 0; | 1945 | return 0; |
@@ -1956,7 +1956,7 @@ lcs_portno_store (struct device *dev, struct device_attribute *attr, const char | |||
1956 | struct lcs_card *card; | 1956 | struct lcs_card *card; |
1957 | int value; | 1957 | int value; |
1958 | 1958 | ||
1959 | card = (struct lcs_card *)dev->driver_data; | 1959 | card = dev_get_drvdata(dev); |
1960 | 1960 | ||
1961 | if (!card) | 1961 | if (!card) |
1962 | return 0; | 1962 | return 0; |
@@ -1990,7 +1990,7 @@ lcs_timeout_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
1990 | { | 1990 | { |
1991 | struct lcs_card *card; | 1991 | struct lcs_card *card; |
1992 | 1992 | ||
1993 | card = (struct lcs_card *)dev->driver_data; | 1993 | card = dev_get_drvdata(dev); |
1994 | 1994 | ||
1995 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; | 1995 | return card ? sprintf(buf, "%u\n", card->lancmd_timeout) : 0; |
1996 | } | 1996 | } |
@@ -2001,7 +2001,7 @@ lcs_timeout_store (struct device *dev, struct device_attribute *attr, const char | |||
2001 | struct lcs_card *card; | 2001 | struct lcs_card *card; |
2002 | int value; | 2002 | int value; |
2003 | 2003 | ||
2004 | card = (struct lcs_card *)dev->driver_data; | 2004 | card = dev_get_drvdata(dev); |
2005 | 2005 | ||
2006 | if (!card) | 2006 | if (!card) |
2007 | return 0; | 2007 | return 0; |
@@ -2020,7 +2020,7 @@ static ssize_t | |||
2020 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, | 2020 | lcs_dev_recover_store(struct device *dev, struct device_attribute *attr, |
2021 | const char *buf, size_t count) | 2021 | const char *buf, size_t count) |
2022 | { | 2022 | { |
2023 | struct lcs_card *card = dev->driver_data; | 2023 | struct lcs_card *card = dev_get_drvdata(dev); |
2024 | char *tmp; | 2024 | char *tmp; |
2025 | int i; | 2025 | int i; |
2026 | 2026 | ||
@@ -2073,7 +2073,7 @@ lcs_probe_device(struct ccwgroup_device *ccwgdev) | |||
2073 | put_device(&ccwgdev->dev); | 2073 | put_device(&ccwgdev->dev); |
2074 | return ret; | 2074 | return ret; |
2075 | } | 2075 | } |
2076 | ccwgdev->dev.driver_data = card; | 2076 | dev_set_drvdata(&ccwgdev->dev, card); |
2077 | ccwgdev->cdev[0]->handler = lcs_irq; | 2077 | ccwgdev->cdev[0]->handler = lcs_irq; |
2078 | ccwgdev->cdev[1]->handler = lcs_irq; | 2078 | ccwgdev->cdev[1]->handler = lcs_irq; |
2079 | card->gdev = ccwgdev; | 2079 | card->gdev = ccwgdev; |
@@ -2090,7 +2090,7 @@ lcs_register_netdev(struct ccwgroup_device *ccwgdev) | |||
2090 | struct lcs_card *card; | 2090 | struct lcs_card *card; |
2091 | 2091 | ||
2092 | LCS_DBF_TEXT(2, setup, "regnetdv"); | 2092 | LCS_DBF_TEXT(2, setup, "regnetdv"); |
2093 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2093 | card = dev_get_drvdata(&ccwgdev->dev); |
2094 | if (card->dev->reg_state != NETREG_UNINITIALIZED) | 2094 | if (card->dev->reg_state != NETREG_UNINITIALIZED) |
2095 | return 0; | 2095 | return 0; |
2096 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); | 2096 | SET_NETDEV_DEV(card->dev, &ccwgdev->dev); |
@@ -2123,7 +2123,7 @@ lcs_new_device(struct ccwgroup_device *ccwgdev) | |||
2123 | enum lcs_dev_states recover_state; | 2123 | enum lcs_dev_states recover_state; |
2124 | int rc; | 2124 | int rc; |
2125 | 2125 | ||
2126 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2126 | card = dev_get_drvdata(&ccwgdev->dev); |
2127 | if (!card) | 2127 | if (!card) |
2128 | return -ENODEV; | 2128 | return -ENODEV; |
2129 | 2129 | ||
@@ -2229,7 +2229,7 @@ __lcs_shutdown_device(struct ccwgroup_device *ccwgdev, int recovery_mode) | |||
2229 | int ret; | 2229 | int ret; |
2230 | 2230 | ||
2231 | LCS_DBF_TEXT(3, setup, "shtdndev"); | 2231 | LCS_DBF_TEXT(3, setup, "shtdndev"); |
2232 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2232 | card = dev_get_drvdata(&ccwgdev->dev); |
2233 | if (!card) | 2233 | if (!card) |
2234 | return -ENODEV; | 2234 | return -ENODEV; |
2235 | if (recovery_mode == 0) { | 2235 | if (recovery_mode == 0) { |
@@ -2296,7 +2296,7 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev) | |||
2296 | { | 2296 | { |
2297 | struct lcs_card *card; | 2297 | struct lcs_card *card; |
2298 | 2298 | ||
2299 | card = (struct lcs_card *)ccwgdev->dev.driver_data; | 2299 | card = dev_get_drvdata(&ccwgdev->dev); |
2300 | if (!card) | 2300 | if (!card) |
2301 | return; | 2301 | return; |
2302 | 2302 | ||