From: Dinh Nguyen <dinh.linux@gmail.com>
To: Ley Foon Tan <lftan@altera.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Suman Anna <s-anna@ti.com>,
devicetree@vger.kernel.org
Subject: Re: [PATCH (resend)] mailbox: Add Altera mailbox driver
Date: Mon, 15 Dec 2014 08:22:23 -0600 [thread overview]
Message-ID: <548EEE9F.4030508@gmail.com> (raw)
In-Reply-To: <CAFiDJ58uQifY7th-mzvm2mjgJdw_MWmWFFhDPYT9TomOexiVNw@mail.gmail.com>
On 12/15/14, 12:22 AM, Ley Foon Tan wrote:
> On Fri, Dec 12, 2014 at 10:38 PM, Dinh Nguyen <dinh.linux@gmail.com> wrote:
>
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/device.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/interrupt.h>
>>> +#include <linux/io.h>
>>> +#include <linux/of.h>
>>> +#include <linux/mailbox_controller.h>
>>
>> Alphabetize the headers.
> Okay.
>
>
>>> +static int altera_mbox_startup_sender(struct mbox_chan *chan)
>>> +{
>>> + int ret;
>>> + struct altera_mbox *mbox = to_altera_mbox(chan);
>>> +
>>> + if (mbox->intr_mode) {
>>> + ret = request_irq(mbox->irq, altera_mbox_tx_interrupt, 0,
>>
>> Use devm_request_irq, since you didn't have and don't need use free_irq
>> in the shutdown function.
> We want to free_irq when it shutdown. That means nobody requests for
> that mailbox (or channel) and request_irq() again if someone requests
> for a mailbox.
>
But you didn't have any free_irq in the shutdown function. Use
devm_request_irq here, so you don't have to add them.
Dinh
next prev parent reply other threads:[~2014-12-15 14:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 6:22 Ley Foon Tan
2014-12-15 14:22 ` Dinh Nguyen [this message]
2014-12-16 2:00 ` Ley Foon Tan
-- strict thread matches above, loose matches on Subject: below --
2014-12-12 10:04 Ley Foon Tan
2014-12-12 14:38 ` Dinh Nguyen
2014-12-15 20:54 ` Suman Anna
2014-12-16 6:33 ` Ley Foon Tan
2014-12-16 19:53 ` Suman Anna
2014-12-17 2:30 ` Ley Foon Tan
2014-12-17 17:17 ` Dinh Nguyen
2014-12-18 2:08 ` Ley Foon Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548EEE9F.4030508@gmail.com \
--to=dinh.linux@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jassisinghbrar@gmail.com \
--cc=lftan@altera.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s-anna@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome