Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbaLOOWa (ORCPT ); Mon, 15 Dec 2014 09:22:30 -0500 Received: from mail-oi0-f51.google.com ([209.85.218.51]:39005 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704AbaLOOW1 (ORCPT ); Mon, 15 Dec 2014 09:22:27 -0500 Message-ID: <548EEE9F.4030508@gmail.com> Date: Mon, 15 Dec 2014 08:22:23 -0600 From: Dinh Nguyen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ley Foon Tan CC: Jassi Brar , "linux-kernel@vger.kernel.org" , Suman Anna , devicetree@vger.kernel.org Subject: Re: [PATCH (resend)] mailbox: Add Altera mailbox driver References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/15/14, 12:22 AM, Ley Foon Tan wrote: > On Fri, Dec 12, 2014 at 10:38 PM, Dinh Nguyen wrote: > >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >> >> 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 -- 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/