usb: typec: ucsi: add firmware flashing support
Greg Kroah-Hartman
maintainerPATCH v2 6/6 usb: typec: ucsi: add firmware flashing support
Quoted 4 lines · Ajay Gupta
(quoted diff) +4
-0+static int ccg_restart(struct ucsi_ccg *uc) +{ + struct device *dev = uc->dev; + int status;
Review
Quoted 10 lines
(quoted diff) +10
-0+ + status = ucsi_ccg_init(uc); + if (status < 0) { + dev_err(dev, "ucsi_ccg_start fail, err=%d\n", status); + return status; + } + + status = devm_request_threaded_irq(dev, uc->irq, NULL, ccg_irq_handler, + IRQF_ONESHOT | IRQF_TRIGGER_HIGH, + dev_name(dev), uc);
Are you _sure_ you can use devm here? That's almost always the wrong thing to do as the irq will stick around after your driver could be unloaded. Just be very careful here, and look at all of the patches in the kernel tree where stuff like this has been fixed to make sure you are not also doing the same thing.
thanks,
greg k-h