]> git.baikalelectronics.ru Git - kernel.git/commit
sata_mv: simplify freeze/thaw bit-shift calculations
authorMark Lord <liml@rtr.ca>
Sat, 19 Apr 2008 19:05:50 +0000 (15:05 -0400)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Apr 2008 05:25:36 +0000 (01:25 -0400)
commit94b7c9acce8e23392ca0de0ec9ed68d3418ff9bd
tree78cf6aa4b73149fede2f72ad3f5423a6d78b84d7
parentaa72f7511853c53abe2c8beb31c6e8686cb589ca
sata_mv: simplify freeze/thaw bit-shift calculations

Introduce the MV_PORT_TO_SHIFT_AND_HARDPORT() macro,
to centralize/simplify various scattered bits of logic
for calculating bit shifts and the like.

Some of the places that do this get it wrong, too,
so consolidating the algorithm at one place will help
keep the code correct.

For now, we use the new macro in mv_eh_{freeze,thaw}.
A subsequent patch will re-use this in the interrupt handlers

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/sata_mv.c