mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
virt: vmgenid: move to using dev_set/get_drvdata
The prior commit moved the order of initializing driver_data around. In looking through the tree at what is normally done, it appears that actually few drivers set or get driver_data directly, but instead go through the dev_set/get_drvdata helpers, which are simple inline helpers that amount to the same exact code. So, for the sake of consistency, use the helpers. Signed-off-by: Jason A. Donenfeld <[email protected]>
This commit is contained in:
1 parent
9f8139c614
commit
403f45735f
1 file changed
+3
-3
@@ -25,7 +25,7 @@ struct vmgenid_state {
|
||||
|
||||
static void vmgenid_notify(struct device *device)
|
||||
{
|
||||
struct vmgenid_state *state = device->driver_data;
|
||||
struct vmgenid_state *state = dev_get_drvdata(device);
|
||||
u8 old_id[VMGENID_SIZE];
|
||||
|
||||
memcpy(old_id, state->this_id, sizeof(old_id));
|
||||
@@ -83,7 +83,7 @@ static int vmgenid_add_acpi(struct device *dev, struct vmgenid_state *state)
|
||||
}
|
||||
setup_vmgenid_state(state, virt_addr);
|
||||
|
||||
dev->driver_data = state;
|
||||
dev_set_drvdata(dev, state);
|
||||
|
||||
status = acpi_install_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
|
||||
vmgenid_acpi_handler, dev);
|
||||
@@ -125,7 +125,7 @@ static int vmgenid_add_of(struct platform_device *pdev,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
pdev->dev.driver_data = state;
|
||||
dev_set_drvdata(&pdev->dev, state);
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, ret, vmgenid_of_irq_handler,
|
||||
IRQF_SHARED, "vmgenid", &pdev->dev);
|
||||
|
||||
Reference in new issue
Block a user