On 6/21/2011 11:23 PM, 劉嘉駿 wrote: > +static int elan_touch_get_pr_cmd(struct spi_device *spi, const u8 addr_h, > + const u8 addr_l, const char *what, int > *sr_param) > +{ > + struct elan_data *ed = spi_get_drvdata(spi); > + u8 get_palm_rej_param[6] = {0x96, 0x00, 0x00, 0x00, 0x00, 0xF1}; > + u8 buf_recv[6]; > + int rc; > + > + /* Command not support in IAP recovery mode */ > + if (ed->protocol & PRO_UPDATE_FW_MODE) > + return 0; > + > + get_palm_rej_param[1] = addr_h; > + get_palm_rej_param[2] = addr_l; > + > + disable_irq(ed->spi->irq);
uhhhh NO! disable_irq() is very very evil. you had a somewhat valid reason for it in your firmware recovery path... but not here. also, this function is missing the get/put for the runtime PM, so you're talking to your chip while it is in power management mode... is that valid? _______________________________________________ MeeGo-kernel mailing list MeeGo-kernel@lists.meego.com http://lists.meego.com/listinfo/meego-kernel