net: ethernet: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6d0bfe2261
commit
8513fbd880
@@ -2506,7 +2506,7 @@ static struct quattro *quattro_sbus_find(struct platform_device *child)
|
||||
struct quattro *qp;
|
||||
|
||||
op = to_platform_device(parent);
|
||||
qp = dev_get_drvdata(&op->dev);
|
||||
qp = platform_get_drvdata(op);
|
||||
if (qp)
|
||||
return qp;
|
||||
|
||||
@@ -2521,7 +2521,7 @@ static struct quattro *quattro_sbus_find(struct platform_device *child)
|
||||
qp->next = qfe_sbus_list;
|
||||
qfe_sbus_list = qp;
|
||||
|
||||
dev_set_drvdata(&op->dev, qp);
|
||||
platform_set_drvdata(op, qp);
|
||||
}
|
||||
return qp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user