Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec87da10 authored by Lubomir Rintel's avatar Lubomir Rintel Committed by Dmitry Torokhov
Browse files

Input: olpc_apsp - assign priv->dev earlier



The dev field needs to be set when serio_register_port() is called,
because the open callback may use it (in the error handling path).

Fixes: commit af518342 ("Input: olpc_apsp - check FIFO status on open(), not probe()")
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d77651a2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ static int olpc_apsp_probe(struct platform_device *pdev)
	if (!priv)
		return -ENOMEM;

	priv->dev = &pdev->dev;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	priv->base = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(priv->base)) {
@@ -248,7 +250,6 @@ static int olpc_apsp_probe(struct platform_device *pdev)
		goto err_irq;
	}

	priv->dev = &pdev->dev;
	device_init_wakeup(priv->dev, 1);
	platform_set_drvdata(pdev, priv);