unsigned long phys;
unsigned int irq;
spinlock_t lock;
- void __iomem *base;
+ void *base;
};
struct locomo_dev_info {
{
int req, i;
struct irqdesc *d;
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
/* Acknowledge the parent IRQ */
desc->chip->ack(irq);
static void locomo_mask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_ICR);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_START));
static void locomo_unmask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_ICR);
r |= (0x0010 << (irq - LOCOMO_IRQ_START));
struct pt_regs *regs)
{
struct irqdesc *d;
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
d = irq_desc + LOCOMO_IRQ_KEY_START;
static void locomo_key_ack_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START));
static void locomo_key_mask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START));
static void locomo_key_unmask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START));
{
int req, i;
struct irqdesc *d;
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
req = locomo_readl(mapbase + LOCOMO_GIR) &
locomo_readl(mapbase + LOCOMO_GPD) &
static void locomo_gpio_ack_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GWE);
r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
static void locomo_gpio_mask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GIE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
static void locomo_gpio_unmask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_GIE);
r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
struct pt_regs *regs)
{
struct irqdesc *d;
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
d = irq_desc + LOCOMO_IRQ_LT_START;
static void locomo_lt_ack_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT);
r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START));
static void locomo_lt_mask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT);
r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START));
static void locomo_lt_unmask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_LTINT);
r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START));
{
int req, i;
struct irqdesc *d;
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F;
if (req) {
static void locomo_spi_ack_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIWE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
static void locomo_spi_mask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE);
r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
static void locomo_spi_unmask_irq(unsigned int irq)
{
- void __iomem *mapbase = get_irq_chipdata(irq);
+ void *mapbase = get_irq_chipdata(irq);
unsigned int r;
r = locomo_readl(mapbase + LOCOMO_SPIIE);
r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
static void locomo_setup_irq(struct locomo *lchip)
{
int irq;
- void __iomem *irqbase = lchip->base;
+ void *irqbase = lchip->base;
/*
* Install handler for IRQ_LOCOMO_HW.
struct locomo_dev *dev;
int ret;
- dev = kzalloc(sizeof(struct locomo_dev), GFP_KERNEL);
+ dev = kmalloc(sizeof(struct locomo_dev), GFP_KERNEL);
if (!dev) {
ret = -ENOMEM;
goto out;
}
+ memset(dev, 0, sizeof(struct locomo_dev));
strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
/*
unsigned long r;
int i, ret = -ENODEV;
- lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL);
+ lchip = kmalloc(sizeof(struct locomo), GFP_KERNEL);
if (!lchip)
return -ENOMEM;
+ memset(lchip, 0, sizeof(struct locomo));
+
spin_lock_init(&lchip->lock);
lchip->dev = me;
if (!mem)
return -EINVAL;
irq = platform_get_irq(dev, 0);
- if (irq < 0)
- return -ENXIO;
return __locomo_probe(&dev->dev, mem, irq);
}