On Fri, Jun 24, 2011 at 10:14:03AM -0500, Moiz Sonasath wrote: ... > + if (enabled) > + twl->vbus_enable = 1; > + else > + twl->vbus_enable = 0; > + Suggest twl->vbus_enable = enabled; > /* > * Start driving VBUS. Set OPA_MODE bit in CHARGERUSB_CTRL1 > * register. This enables boost mode. > */ > - if (enabled) > - twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x40, > - CHARGERUSB_CTRL1); > - else > - twl6030_writeb(twl, TWL_MODULE_MAIN_CHARGE , 0x00, > - CHARGERUSB_CTRL1); > + > + schedule_work(&twl->set_vbus_work); > + Suggest also moving the comments together with the new location of the code to write CHARGERUSB_CTRL1. Add a cancel_work_sync(&twl->set_vbus_work) at twl6030_usb_remove(), prior to kfree(twl). -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html