aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/claw.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 15:57:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-16 15:57:37 -0400
commit6fd03301d76bc439382710e449f58efbb233df1b (patch)
tree3c8a3217aed67319683ffc1debccdb5b3245b16c /drivers/s390/net/claw.c
parentcd5232bd6be2d215a800f3d88c287ca791debfbe (diff)
parente4792aa30f9d33584d7192685ed149cc5fee737f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (64 commits) debugfs: use specified mode to possibly mark files read/write only debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. xen: remove driver_data direct access of struct device from more drivers usb: gadget: at91_udc: remove driver_data direct access of struct device uml: remove driver_data direct access of struct device block/ps3: remove driver_data direct access of struct device s390: remove driver_data direct access of struct device parport: remove driver_data direct access of struct device parisc: remove driver_data direct access of struct device of_serial: remove driver_data direct access of struct device mips: remove driver_data direct access of struct device ipmi: remove driver_data direct access of struct device infiniband: ehca: remove driver_data direct access of struct device ibmvscsi: gadget: at91_udc: remove driver_data direct access of struct device hvcs: remove driver_data direct access of struct device xen block: remove driver_data direct access of struct device thermal: remove driver_data direct access of struct device scsi: remove driver_data direct access of struct device pcmcia: remove driver_data direct access of struct device PCIE: remove driver_data direct access of struct device ... Manually fix up trivial conflicts due to different direct driver_data direct access fixups in drivers/block/{ps3disk.c,ps3vram.c}
Diffstat (limited to 'drivers/s390/net/claw.c')
-rw-r--r--drivers/s390/net/claw.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index d40f7a934f94..f370f8d460a7 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -290,7 +290,7 @@ claw_probe(struct ccwgroup_device *cgdev)
290 if (!get_device(&cgdev->dev)) 290 if (!get_device(&cgdev->dev))
291 return -ENODEV; 291 return -ENODEV;
292 privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL); 292 privptr = kzalloc(sizeof(struct claw_privbk), GFP_KERNEL);
293 cgdev->dev.driver_data = privptr; 293 dev_set_drvdata(&cgdev->dev, privptr);
294 if (privptr == NULL) { 294 if (privptr == NULL) {
295 probe_error(cgdev); 295 probe_error(cgdev);
296 put_device(&cgdev->dev); 296 put_device(&cgdev->dev);
@@ -597,14 +597,14 @@ claw_irq_handler(struct ccw_device *cdev,
597 597
598 CLAW_DBF_TEXT(4, trace, "clawirq"); 598 CLAW_DBF_TEXT(4, trace, "clawirq");
599 /* Bypass all 'unsolicited interrupts' */ 599 /* Bypass all 'unsolicited interrupts' */
600 if (!cdev->dev.driver_data) { 600 privptr = dev_get_drvdata(&cdev->dev);
601 if (!privptr) {
601 dev_warn(&cdev->dev, "An uninitialized CLAW device received an" 602 dev_warn(&cdev->dev, "An uninitialized CLAW device received an"
602 " IRQ, c-%02x d-%02x\n", 603 " IRQ, c-%02x d-%02x\n",
603 irb->scsw.cmd.cstat, irb->scsw.cmd.dstat); 604 irb->scsw.cmd.cstat, irb->scsw.cmd.dstat);
604 CLAW_DBF_TEXT(2, trace, "badirq"); 605 CLAW_DBF_TEXT(2, trace, "badirq");
605 return; 606 return;
606 } 607 }
607 privptr = (struct claw_privbk *)cdev->dev.driver_data;
608 608
609 /* Try to extract channel from driver data. */ 609 /* Try to extract channel from driver data. */
610 if (privptr->channel[READ].cdev == cdev) 610 if (privptr->channel[READ].cdev == cdev)
@@ -1986,9 +1986,9 @@ probe_error( struct ccwgroup_device *cgdev)
1986 struct claw_privbk *privptr; 1986 struct claw_privbk *privptr;
1987 1987
1988 CLAW_DBF_TEXT(4, trace, "proberr"); 1988 CLAW_DBF_TEXT(4, trace, "proberr");
1989 privptr = (struct claw_privbk *) cgdev->dev.driver_data; 1989 privptr = dev_get_drvdata(&cgdev->dev);
1990 if (privptr != NULL) { 1990 if (privptr != NULL) {
1991 cgdev->dev.driver_data = NULL; 1991 dev_set_drvdata(&cgdev->dev, NULL);
1992 kfree(privptr->p_env); 1992 kfree(privptr->p_env);
1993 kfree(privptr->p_mtc_envelope); 1993 kfree(privptr->p_mtc_envelope);
1994 kfree(privptr); 1994 kfree(privptr);
@@ -2917,9 +2917,9 @@ claw_new_device(struct ccwgroup_device *cgdev)
2917 dev_info(&cgdev->dev, "add for %s\n", 2917 dev_info(&cgdev->dev, "add for %s\n",
2918 dev_name(&cgdev->cdev[READ]->dev)); 2918 dev_name(&cgdev->cdev[READ]->dev));
2919 CLAW_DBF_TEXT(2, setup, "new_dev"); 2919 CLAW_DBF_TEXT(2, setup, "new_dev");
2920 privptr = cgdev->dev.driver_data; 2920 privptr = dev_get_drvdata(&cgdev->dev);
2921 cgdev->cdev[READ]->dev.driver_data = privptr; 2921 dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr);
2922 cgdev->cdev[WRITE]->dev.driver_data = privptr; 2922 dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr);
2923 if (!privptr) 2923 if (!privptr)
2924 return -ENODEV; 2924 return -ENODEV;
2925 p_env = privptr->p_env; 2925 p_env = privptr->p_env;
@@ -2956,9 +2956,9 @@ claw_new_device(struct ccwgroup_device *cgdev)
2956 goto out; 2956 goto out;
2957 } 2957 }
2958 dev->ml_priv = privptr; 2958 dev->ml_priv = privptr;
2959 cgdev->dev.driver_data = privptr; 2959 dev_set_drvdata(&cgdev->dev, privptr);
2960 cgdev->cdev[READ]->dev.driver_data = privptr; 2960 dev_set_drvdata(&cgdev->cdev[READ]->dev, privptr);
2961 cgdev->cdev[WRITE]->dev.driver_data = privptr; 2961 dev_set_drvdata(&cgdev->cdev[WRITE]->dev, privptr);
2962 /* sysfs magic */ 2962 /* sysfs magic */
2963 SET_NETDEV_DEV(dev, &cgdev->dev); 2963 SET_NETDEV_DEV(dev, &cgdev->dev);
2964 if (register_netdev(dev) != 0) { 2964 if (register_netdev(dev) != 0) {
@@ -3024,7 +3024,7 @@ claw_shutdown_device(struct ccwgroup_device *cgdev)
3024 int ret; 3024 int ret;
3025 3025
3026 CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); 3026 CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev));
3027 priv = cgdev->dev.driver_data; 3027 priv = dev_get_drvdata(&cgdev->dev);
3028 if (!priv) 3028 if (!priv)
3029 return -ENODEV; 3029 return -ENODEV;
3030 ndev = priv->channel[READ].ndev; 3030 ndev = priv->channel[READ].ndev;
@@ -3054,7 +3054,7 @@ claw_remove_device(struct ccwgroup_device *cgdev)
3054 3054
3055 BUG_ON(!cgdev); 3055 BUG_ON(!cgdev);
3056 CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev)); 3056 CLAW_DBF_TEXT_(2, setup, "%s", dev_name(&cgdev->dev));
3057 priv = cgdev->dev.driver_data; 3057 priv = dev_get_drvdata(&cgdev->dev);
3058 BUG_ON(!priv); 3058 BUG_ON(!priv);
3059 dev_info(&cgdev->dev, " will be removed.\n"); 3059 dev_info(&cgdev->dev, " will be removed.\n");
3060 if (cgdev->state == CCWGROUP_ONLINE) 3060 if (cgdev->state == CCWGROUP_ONLINE)
@@ -3069,9 +3069,9 @@ claw_remove_device(struct ccwgroup_device *cgdev)
3069 kfree(priv->channel[1].irb); 3069 kfree(priv->channel[1].irb);
3070 priv->channel[1].irb=NULL; 3070 priv->channel[1].irb=NULL;
3071 kfree(priv); 3071 kfree(priv);
3072 cgdev->dev.driver_data=NULL; 3072 dev_set_drvdata(&cgdev->dev, NULL);
3073 cgdev->cdev[READ]->dev.driver_data = NULL; 3073 dev_set_drvdata(&cgdev->cdev[READ]->dev, NULL);
3074 cgdev->cdev[WRITE]->dev.driver_data = NULL; 3074 dev_set_drvdata(&cgdev->cdev[WRITE]->dev, NULL);
3075 put_device(&cgdev->dev); 3075 put_device(&cgdev->dev);
3076 3076
3077 return; 3077 return;
@@ -3087,7 +3087,7 @@ claw_hname_show(struct device *dev, struct device_attribute *attr, char *buf)
3087 struct claw_privbk *priv; 3087 struct claw_privbk *priv;
3088 struct claw_env * p_env; 3088 struct claw_env * p_env;
3089 3089
3090 priv = dev->driver_data; 3090 priv = dev_get_drvdata(dev);
3091 if (!priv) 3091 if (!priv)
3092 return -ENODEV; 3092 return -ENODEV;
3093 p_env = priv->p_env; 3093 p_env = priv->p_env;
@@ -3101,7 +3101,7 @@ claw_hname_write(struct device *dev, struct device_attribute *attr,
3101 struct claw_privbk *priv; 3101 struct claw_privbk *priv;
3102 struct claw_env * p_env; 3102 struct claw_env * p_env;
3103 3103
3104 priv = dev->driver_data; 3104 priv = dev_get_drvdata(dev);
3105 if (!priv) 3105 if (!priv)
3106 return -ENODEV; 3106 return -ENODEV;
3107 p_env = priv->p_env; 3107 p_env = priv->p_env;
@@ -3125,7 +3125,7 @@ claw_adname_show(struct device *dev, struct device_attribute *attr, char *buf)
3125 struct claw_privbk *priv; 3125 struct claw_privbk *priv;
3126 struct claw_env * p_env; 3126 struct claw_env * p_env;
3127 3127
3128 priv = dev->driver_data; 3128 priv = dev_get_drvdata(dev);
3129 if (!priv) 3129 if (!priv)
3130 return -ENODEV; 3130 return -ENODEV;
3131 p_env = priv->p_env; 3131 p_env = priv->p_env;
@@ -3139,7 +3139,7 @@ claw_adname_write(struct device *dev, struct device_attribute *attr,
3139 struct claw_privbk *priv; 3139 struct claw_privbk *priv;
3140 struct claw_env * p_env; 3140 struct claw_env * p_env;
3141 3141
3142 priv = dev->driver_data; 3142 priv = dev_get_drvdata(dev);
3143 if (!priv) 3143 if (!priv)
3144 return -ENODEV; 3144 return -ENODEV;
3145 p_env = priv->p_env; 3145 p_env = priv->p_env;
@@ -3163,7 +3163,7 @@ claw_apname_show(struct device *dev, struct device_attribute *attr, char *buf)
3163 struct claw_privbk *priv; 3163 struct claw_privbk *priv;
3164 struct claw_env * p_env; 3164 struct claw_env * p_env;
3165 3165
3166 priv = dev->driver_data; 3166 priv = dev_get_drvdata(dev);
3167 if (!priv) 3167 if (!priv)
3168 return -ENODEV; 3168 return -ENODEV;
3169 p_env = priv->p_env; 3169 p_env = priv->p_env;
@@ -3178,7 +3178,7 @@ claw_apname_write(struct device *dev, struct device_attribute *attr,
3178 struct claw_privbk *priv; 3178 struct claw_privbk *priv;
3179 struct claw_env * p_env; 3179 struct claw_env * p_env;
3180 3180
3181 priv = dev->driver_data; 3181 priv = dev_get_drvdata(dev);
3182 if (!priv) 3182 if (!priv)
3183 return -ENODEV; 3183 return -ENODEV;
3184 p_env = priv->p_env; 3184 p_env = priv->p_env;
@@ -3212,7 +3212,7 @@ claw_wbuff_show(struct device *dev, struct device_attribute *attr, char *buf)
3212 struct claw_privbk *priv; 3212 struct claw_privbk *priv;
3213 struct claw_env * p_env; 3213 struct claw_env * p_env;
3214 3214
3215 priv = dev->driver_data; 3215 priv = dev_get_drvdata(dev);
3216 if (!priv) 3216 if (!priv)
3217 return -ENODEV; 3217 return -ENODEV;
3218 p_env = priv->p_env; 3218 p_env = priv->p_env;
@@ -3227,7 +3227,7 @@ claw_wbuff_write(struct device *dev, struct device_attribute *attr,
3227 struct claw_env * p_env; 3227 struct claw_env * p_env;
3228 int nnn,max; 3228 int nnn,max;
3229 3229
3230 priv = dev->driver_data; 3230 priv = dev_get_drvdata(dev);
3231 if (!priv) 3231 if (!priv)
3232 return -ENODEV; 3232 return -ENODEV;
3233 p_env = priv->p_env; 3233 p_env = priv->p_env;
@@ -3254,7 +3254,7 @@ claw_rbuff_show(struct device *dev, struct device_attribute *attr, char *buf)
3254 struct claw_privbk *priv; 3254 struct claw_privbk *priv;
3255 struct claw_env * p_env; 3255 struct claw_env * p_env;
3256 3256
3257 priv = dev->driver_data; 3257 priv = dev_get_drvdata(dev);
3258 if (!priv) 3258 if (!priv)
3259 return -ENODEV; 3259 return -ENODEV;
3260 p_env = priv->p_env; 3260 p_env = priv->p_env;
@@ -3269,7 +3269,7 @@ claw_rbuff_write(struct device *dev, struct device_attribute *attr,
3269 struct claw_env *p_env; 3269 struct claw_env *p_env;
3270 int nnn,max; 3270 int nnn,max;
3271 3271
3272 priv = dev->driver_data; 3272 priv = dev_get_drvdata(dev);
3273 if (!priv) 3273 if (!priv)
3274 return -ENODEV; 3274 return -ENODEV;
3275 p_env = priv->p_env; 3275 p_env = priv->p_env;