staging: comedi: amplc_pci230: fix DACOUT write
PATCH 1/1 staging: comedi: amplc_pci230: fix DACOUT write
Commit 4f9c63fe5333b27ab23ed399830c7977f6970744 ("staging: comedi:amplc_pci230: refactor iobase addresses") removed some parentheses (presumably to keep the line withing 80 chars) in pci230_ao_write_nofifo() when writing to the DACOUT1 or DACOUT2 registers, but it removed the wrong parentheses. Fix it.
---
This bug is in linux-next master and staging-next.
--- drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/amplc_pci230.c +1 -1
@@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,/* Write mangled datum to appropriate DACOUT register. */ outw (pci230_ao_mangle_datum (dev, datum), - devpriv->daqio + ((chan) ==0 ) ?PCI230_DACOUT1 :PCI230_DACOUT2 ); + devpriv->daqio + (chan ==0 ?PCI230_DACOUT1 :PCI230_DACOUT2 )); } static inline void pci230_ao_write_fifo(struct comedi_device *dev,
Signature · 1 line
2.0.4
Greg Kroah-Hartman
maintainerQuoted 28 lines · Ian Abbott
Commit
4f9c63fe5333b27ab23ed399830c7977f6970744("staging: comedi:amplc_pci230: refactor iobase addresses") removed some parentheses (presumably to keep the line withing 80 chars) inpci230_ao_write_nofifo()when writing to the DACOUT1 or DACOUT2 registers, but it removed the wrong parentheses. Fix it.Signed-off-by Ian Abbott <[email protected]>---
This bug is in linux-next master and staging-next.--- drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/drivers/amplc_pci230.c +1
-1@@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,/* Write mangled datum to appropriate DACOUT register. */ outw (pci230_ao_mangle_datum (dev, datum), - devpriv->daqio + ((chan) ==0 ) ?PCI230_DACOUT1 :PCI230_DACOUT2 ); + devpriv->daqio + (chan ==0 ?PCI230_DACOUT1 :PCI230_DACOUT2 )); } static inline void pci230_ao_write_fifo(struct comedi_device *dev,Signature · 1 line
2.0.4
This doesn't apply to my tree anymore, is it still needed?
thanks,
greg k-h
Quoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Ian Abbott
Commit
4f9c63fe5333b27ab23ed399830c7977f6970744("staging: comedi:amplc_pci230: refactor iobase addresses") removed some parentheses (presumably to keep the line withing 80 chars) inpci230_ao_write_nofifo()when writing to the DACOUT1 or DACOUT2 registers, but it removed the wrong parentheses. Fix it.Signed-off-by Ian Abbott <[email protected]>---
This bug is in linux-next master and staging-next.--- drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/drivers/amplc_pci230.c +1
-1@@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,/* Write mangled datum to appropriate DACOUT register. */ outw (pci230_ao_mangle_datum (dev, datum), - devpriv->daqio + ((chan) ==0 ) ?PCI230_DACOUT1 :PCI230_DACOUT2 ); + devpriv->daqio + (chan ==0 ?PCI230_DACOUT1 :PCI230_DACOUT2 )); }
Quoted 5 lines
Quoted 3 lines
drivers/staging/comedi/drivers/amplc_pci230.c +0
-0static inline void pci230_ao_write_fifo(struct comedi_device *dev,Signature · 1 line
2.0.4This doesn't apply to my tree anymore, is it still needed?
Looks like you already applied a similar patch from Dan Carpenter:
commit 94254d1baec765b22cc5df3a9a16a8cc9a79d406
Author: Dan Carpenter <[email protected]> Date: Tue Aug 26 10:55:51 2014 +0300
staging: comedi: amplc_pci230: fix a precedence bug
Regards,
Hartley
Quoted 33 lines · Hartley Sweeten
Quoted 26 lines · Greg Kroah-Hartman
Quoted 25 lines · Ian Abbott
Commit
4f9c63fe5333b27ab23ed399830c7977f6970744("staging: comedi:amplc_pci230: refactor iobase addresses") removed some parentheses (presumably to keep the line withing 80 chars) inpci230_ao_write_nofifo()when writing to the DACOUT1 or DACOUT2 registers, but it removed the wrong parentheses. Fix it.Signed-off-by Ian Abbott <[email protected]>---
This bug is in linux-next master and staging-next.--- drivers/staging/comedi/drivers/amplc_pci230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/comedi/drivers/amplc_pci230.c +1
-1@@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,/* Write mangled datum to appropriate DACOUT register. */ outw (pci230_ao_mangle_datum (dev, datum), - devpriv->daqio + ((chan) ==0 ) ?PCI230_DACOUT1 :PCI230_DACOUT2 ); + devpriv->daqio + (chan ==0 ?PCI230_DACOUT1 :PCI230_DACOUT2 )); }Quoted 5 lines
Quoted 3 lines
drivers/staging/comedi/drivers/amplc_pci230.c +0
-1static inline void pci230_ao_write_fifo(struct comedi_device *dev, --2.0.4
This doesn't apply to my tree anymore, is it still needed?
Quoted 7 lines
Looks like you already applied a similar patch from Dan Carpenter:
commit
94254d1baec765b22cc5df3a9a16a8cc9a79d406Author: Dan Carpenter <[email protected]> Date: Tue Aug 26 10:55:51 2014 +0300staging: comedi:
amplc_pci230: fix a precedence bug
No, it's no longer needed.
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd. E-mail: <[email protected]> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-