aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/vmlogrdr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-04 15:40:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:28 -0400
commitdff59b64af94dc588044d70f3708cb835055c5b6 (patch)
tree5d4069fa0ac280b637b8aa691e71ac3b58a508b5 /drivers/s390/char/vmlogrdr.c
parent61616115d748e2eb76c43715383e602b09d9bf50 (diff)
s390: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Thanks to Sebastian Ott <sebott@linux.vnet.ibm.com> for fixing a few typos in my original version of this patch. Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Sebastian Ott <sebott@linux.vnet.ibm.com> Cc: linux-s390@vger.kernel.org Cc: linux390@de.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/s390/char/vmlogrdr.c')
-rw-r--r--drivers/s390/char/vmlogrdr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index d8a2289fcb69..ee1b418b0d8a 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -504,7 +504,7 @@ static ssize_t vmlogrdr_autopurge_store(struct device * dev,
504 struct device_attribute *attr, 504 struct device_attribute *attr,
505 const char * buf, size_t count) 505 const char * buf, size_t count)
506{ 506{
507 struct vmlogrdr_priv_t *priv = dev->driver_data; 507 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
508 ssize_t ret = count; 508 ssize_t ret = count;
509 509
510 switch (buf[0]) { 510 switch (buf[0]) {
@@ -525,7 +525,7 @@ static ssize_t vmlogrdr_autopurge_show(struct device *dev,
525 struct device_attribute *attr, 525 struct device_attribute *attr,
526 char *buf) 526 char *buf)
527{ 527{
528 struct vmlogrdr_priv_t *priv = dev->driver_data; 528 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
529 return sprintf(buf, "%u\n", priv->autopurge); 529 return sprintf(buf, "%u\n", priv->autopurge);
530} 530}
531 531
@@ -541,7 +541,7 @@ static ssize_t vmlogrdr_purge_store(struct device * dev,
541 541
542 char cp_command[80]; 542 char cp_command[80];
543 char cp_response[80]; 543 char cp_response[80];
544 struct vmlogrdr_priv_t *priv = dev->driver_data; 544 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
545 545
546 if (buf[0] != '1') 546 if (buf[0] != '1')
547 return -EINVAL; 547 return -EINVAL;
@@ -578,7 +578,7 @@ static ssize_t vmlogrdr_autorecording_store(struct device *dev,
578 struct device_attribute *attr, 578 struct device_attribute *attr,
579 const char *buf, size_t count) 579 const char *buf, size_t count)
580{ 580{
581 struct vmlogrdr_priv_t *priv = dev->driver_data; 581 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
582 ssize_t ret = count; 582 ssize_t ret = count;
583 583
584 switch (buf[0]) { 584 switch (buf[0]) {
@@ -599,7 +599,7 @@ static ssize_t vmlogrdr_autorecording_show(struct device *dev,
599 struct device_attribute *attr, 599 struct device_attribute *attr,
600 char *buf) 600 char *buf)
601{ 601{
602 struct vmlogrdr_priv_t *priv = dev->driver_data; 602 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
603 return sprintf(buf, "%u\n", priv->autorecording); 603 return sprintf(buf, "%u\n", priv->autorecording);
604} 604}
605 605
@@ -612,7 +612,7 @@ static ssize_t vmlogrdr_recording_store(struct device * dev,
612 struct device_attribute *attr, 612 struct device_attribute *attr,
613 const char * buf, size_t count) 613 const char * buf, size_t count)
614{ 614{
615 struct vmlogrdr_priv_t *priv = dev->driver_data; 615 struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev);
616 ssize_t ret; 616 ssize_t ret;
617 617
618 switch (buf[0]) { 618 switch (buf[0]) {