Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933738AbbBCIbN (ORCPT ); Tue, 3 Feb 2015 03:31:13 -0500 Received: from ns.mm-sol.com ([37.157.136.199]:47835 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbbBCIbI (ORCPT ); Tue, 3 Feb 2015 03:31:08 -0500 Message-ID: <1422952275.2177.29.camel@mm-sol.com> Subject: Re: [PATCH v4] thermal: Add QPNP PMIC temperature alarm driver From: "Ivan T. Ivanov" To: Stanimir Varbanov Cc: Zhang Rui , Eduardo Valentin , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, David Collins Date: Tue, 03 Feb 2015 10:31:15 +0200 In-Reply-To: <54CF99E9.10305@mm-sol.com> References: <1422890370-6914-1-git-send-email-iivanov@mm-sol.com> <54CF99E9.10305@mm-sol.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.13.7-fta1.2~trusty Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1346 Lines: 45 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; > > +} > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/