[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a0703061504h78890fcexc10e97c026c41924@mail.gmail.com>
Date: Tue, 6 Mar 2007 18:04:56 -0500
From: "Mike Frysinger" <vapier.adi@...il.com>
To: "Alexey Dobriyan" <adobriyan@...il.com>
Cc: "Wu, Bryan" <bryan.wu@...log.com>, khali@...ux-fr.org,
"Andrew Morton" <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, mhfan@...c.edu
Subject: Re: [PATCH -mm] Blackfin: blackfin i2c driver
On 3/6/07, Alexey Dobriyan <adobriyan@...il.com> wrote:
> > +static int __init i2c_bfin_twi_init(void)
> > +{
> > + rc = request_irq(twi_iface.irq, bfin_twi_interrupt_entry, SA_INTERRUPT, "i2c-bfin-twi", &twi_iface);
> > + if (rc) {
> > + printk(KERN_ERR "i2c-bfin-twi: can't get IRQ %d !\n", twi_iface.irq);
> > + return -ENODEV;
> > + }
> > +
> > + /* Set TWI internal clock as 10MHz */
> > + bfin_write_TWI_CONTROL(((get_sclk() / 1024 / 1024 + 5) / 10) & 0x7F);
> > +
> > + /* Set Twi interface clock as specified */
> > + if (CONFIG_TWICLK_KHZ > 400)
> > + bfin_write_TWI_CLKDIV((( 5*1024 / 400 ) << 8) | (( 5*1024 / 400 ) & 0xFF));
> > + else
> > + bfin_write_TWI_CLKDIV((( 5*1024 / CONFIG_TWICLK_KHZ ) << 8) | (( 5*1024 / CONFIG_TWICLK_KHZ ) & 0xFF));
> > +
> > + /* Enable TWI */
> > + bfin_write_TWI_CONTROL(bfin_read_TWI_CONTROL() | TWI_ENA);
> > + SSYNC();
> > +
> > + return i2c_add_adapter(p_adap);
>
> free_irq on error?
what error ? do you mean i2c_add_adapter() ?
-mike
-
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