]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commit1cfd19aeb8c8b6291a9d11143b4d8f3dac508ed4
tree78cf6aa4b73149fede2f72ad3f5423a6d78b84d7
parentf9f7fe014fc7197a5f36f9d9859cbb27c3bdd2ab
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