提交 99357742 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

[S390] monreader: fix dev_set_drvdata conversion

Fix this:

drivers/s390/char/monreader.c: In function 'mon_open':
drivers/s390/char/monreader.c:323: warning: passing argument 1 of 'dev_set_drvdata' from incompatible pointer type
include/linux/device.h:457: note: expected 'struct device *' but argument is of type 'struct device **'
drivers/s390/char/monreader.c: In function 'monreader_freeze':
drivers/s390/char/monreader.c:466: warning: passing argument 1 of 'dev_get_drvdata' from incompatible pointer type
include/linux/device.h:452: note: expected 'const struct device *' but argument is of type 'struct device **'
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 c9568fdd
...@@ -320,7 +320,7 @@ static int mon_open(struct inode *inode, struct file *filp) ...@@ -320,7 +320,7 @@ static int mon_open(struct inode *inode, struct file *filp)
goto out_path; goto out_path;
} }
filp->private_data = monpriv; filp->private_data = monpriv;
dev_set_drvdata(&monreader_device, monpriv); dev_set_drvdata(monreader_device, monpriv);
unlock_kernel(); unlock_kernel();
return nonseekable_open(inode, filp); return nonseekable_open(inode, filp);
...@@ -463,7 +463,7 @@ static struct miscdevice mon_dev = { ...@@ -463,7 +463,7 @@ static struct miscdevice mon_dev = {
*****************************************************************************/ *****************************************************************************/
static int monreader_freeze(struct device *dev) static int monreader_freeze(struct device *dev)
{ {
struct mon_private *monpriv = dev_get_drvdata(&dev); struct mon_private *monpriv = dev_get_drvdata(dev);
int rc; int rc;
if (!monpriv) if (!monpriv)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册