Skip to content

Commit

Permalink
dma/timberdale: simplify conditional
Browse files Browse the repository at this point in the history
Simplify: ((a && b) || (!a && !b)) => (a == b)

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Acked-by: Jack Stone <jwjstone@fastmail.fm>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Nicolas Kaiser authored and Dan Williams committed Oct 19, 2010
1 parent 5fc6d89 commit 9cb047d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/timb_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ static int __devinit td_probe(struct platform_device *pdev)
pdata->channels + i;

/* even channels are RX, odd are TX */
if (((i % 2) && pchan->rx) || (!(i % 2) && !pchan->rx)) {
if ((i % 2) == pchan->rx) {
dev_err(&pdev->dev, "Wrong channel configuration\n");
err = -EINVAL;
goto err_tasklet_kill;
Expand Down

0 comments on commit 9cb047d

Please sign in to comment.