]> bbs.cooldavid.org Git - net-next-2.6.git/commit
CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.
authorJesper Nilsson <jesper.nilsson@axis.com>
Fri, 8 Feb 2008 15:28:36 +0000 (16:28 +0100)
committerJesper Nilsson <jesper.nilsson@axis.com>
Fri, 8 Feb 2008 15:28:36 +0000 (16:28 +0100)
commita34d24425e9c133e875a26c0bbc91783cf485b93
tree86f0d6481a0b4f369fbcb7e2bc7eeb4513683570
parent7800029df321b033ef27122fbb599ee0a839eb53
CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.

Changes as suggested by Andrew Morton, plus general cleanup to
ease later consolidation of driver into machine common driver.

- Correct parameter type of gpio_write to const char __user *
- Remove volatile from the arrays of machine dependent registers, use
  readl and writel to access them instead.
- Remove useless casts of void.
- Use spin_lock_irqsave for locking.
- Break gpio_write into smaller sub-functions.
- Remove useless breaks after returns.
- Don't perform any change in IO_CFG_WRITE_MODE if values are invalid.
  (previously values were set and then set to zero)
- Change cast for copy_to_user to (void __user *)
- Make file_operations gpio_fops static and const.
- Make setget_output static. (However, it's still inline since the CRIS
  architecture is still not SMP, which makes the function small enough
  to inline)
arch/cris/arch-v32/drivers/mach-a3/gpio.c