[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1422952275.2177.29.camel@mm-sol.com>
Date: Tue, 03 Feb 2015 10:31:15 +0200
From: "Ivan T. Ivanov" <iivanov@...sol.com>
To: Stanimir Varbanov <svarbanov@...sol.com>
Cc: Zhang Rui <rui.zhang@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
David Collins <collinsd@...eaurora.org>
Subject: Re: [PATCH v4] thermal: Add QPNP PMIC temperature alarm driver
On Mon, 2015-02-02 at 17:38 +0200, Stanimir Varbanov wrote:
>
> > +
> > + chip->tz_dev = thermal_zone_of_sensor_register(&pdev->dev, 0, chip,
> > + &qpnp_tm_sensor_ops);
> > + if (IS_ERR(chip->tz_dev)) {
> > + dev_err(&pdev->dev, "failed to register sensor\n");
> > + ret = PTR_ERR(chip->tz_dev);
> > + goto fail;
> > + }
> > +
> > + ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, qpnp_tm_isr,
> > + IRQF_ONESHOT, node->name, chip);
> > + if (ret < 0)
> > + goto unreg;
> > +
> > + return 0;
> > +
> > +unreg:
> > + thermal_zone_of_sensor_unregister(&pdev->dev, chip->tz_dev);
>
> Any problem to request_irq before thermal_zone_of_sensor_register? It
> will avoid having thermal sensor unregister call.
Right, will reorder the calls.
Ivan
>
> > +fail:
> > + if (!IS_ERR(chip->adc))
> > + iio_channel_release(chip->adc);
> > +
> > + return ret;
> > +}
>
> <snip>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists