RE: [PATCH v2] usb: typec: tcpci: mask event interrupts when remove driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guenter
> -----Original Message-----
> From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter Roeck
> Sent: 2020年1月20日 14:06
> To: Jun Li <jun.li@xxxxxxx>; heikki.krogerus@xxxxxxxxxxxxxxx
> Cc: gregkh@xxxxxxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx
> <linux-imx@xxxxxxx>
> Subject: Re: [PATCH v2] usb: typec: tcpci: mask event interrupts when remove
> driver
> 
> On 1/19/20 9:55 PM, Jun Li wrote:
> > This is to prevent any possible events generated while unregister tpcm
> > port.
> >
> > Fixes: 74e656d6b0551 ("staging: typec: Type-C Port Controller
> > Interface driver (tcpci)")
> > Signed-off-by: Li Jun <jun.li@xxxxxxx>
> > ---
> >   drivers/usb/typec/tcpm/tcpci.c | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/usb/typec/tcpm/tcpci.c
> > b/drivers/usb/typec/tcpm/tcpci.c index c1f7073..fb9f2c1 100644
> > --- a/drivers/usb/typec/tcpm/tcpci.c
> > +++ b/drivers/usb/typec/tcpm/tcpci.c
> > @@ -581,6 +581,12 @@ static int tcpci_probe(struct i2c_client *client,
> >   static int tcpci_remove(struct i2c_client *client)
> >   {
> >   	struct tcpci_chip *chip = i2c_get_clientdata(client);
> > +	int err;
> > +
> > +	/* Disable chip interrupts before unregistger port */
> 
> s/unregistger/unregistering/
> 
> Sorry, I should have noticed before.

thanks, I will send v3, I thought checkpatch.pl will check spell errors in patch but
seems it only covers commit log.

Li Jun
> 
> > +	err = tcpci_write16(chip->tcpci, TCPC_ALERT_MASK, 0);
> > +	if (err < 0)
> > +		return err;
> >
> >   	tcpci_unregister_port(chip->tcpci);
> >
> >





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux