lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJLyvQw-fpo5mNi6yxS7a2BGjazwiJ=i7=XWxSLbn3a40ykV8A@mail.gmail.com>
Date:	Thu, 25 Oct 2012 18:43:55 +0800
From:	Hongbo Zhang <hongbo.zhang@...aro.org>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Amit Kucheria <amit.kucheria@...aro.org>,
	linaro-dev@...ts.linaro.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, STEricsson_nomadik_linux@...t.st.com,
	kernel@...oocommunity.org, linaro-kernel@...ts.linaro.org,
	"hongbo.zhang" <hongbo.zhang@...aro.com>, patches@...aro.org
Subject: Re: [PATCH V2 5/6] Thermal: Add ST-Ericsson DB8500 thermal dirver.

On 25 October 2012 17:42, Viresh Kumar <viresh.kumar@...aro.org> wrote:
> On 25 October 2012 15:03, Hongbo Zhang <hongbo.zhang@...aro.org> wrote:
>> On 25 October 2012 16:41, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
>> Just paste my current pieces of codes here:
>>
>> static struct db8500_thsens_platform_data*
>>                 db8500_thermal_parse_dt(struct platform_device *pdev)
>> {
>
>>         if (!np) {
>>                 dev_err(&pdev->dev, "Missing device tree data\n");
>
>> }
>>
>> static int db8500_thermal_probe(struct platform_device *pdev)
>> {
>
>>         ptrips = db8500_thermal_parse_dt(pdev);
>>         if (!ptrips)
>>                 ptrips = dev_get_platdata(&pdev->dev);
>
> So, the above code still has the flaw i pointed out. It will print
> "Missing device tree data", while booting for non-DT case.
>
> What i would suggest you is:
>
> static int db8500_thermal_probe(struct platform_device *pdev)
> {
>         struct device_node *np = pdev->dev.of_node;
>
>         if (np)
>                 ptrips = db8500_thermal_parse_dt(pdev);
>         else
>                 ptrips = dev_get_platdata(&pdev->dev);
>
>        if (!ptrips)
>               explode!!
>
This seems neat.
>
>>>>>> +       ret = devm_request_threaded_irq(&pdev->dev, low_irq, NULL,
>
>> I just saw that all the PRCMU and ab8500 related irqs use request_threaded_irq
>> only difference is that I use devm_request_threaded_irq
>
> See, i started this threaded_irq thread is to make sure you know
> exactly what you
> are doing. Others are doing it doesn't mean you should do it too.. :)
>
> You must dig in a bit to see why is it required for your case? If
> earlier code related
> to PRCMU and db8500 is correct, then i am sure you need to sleep from your
> handler.
>
> --
> viresh
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ