/*
- * matrox_w1.c
+ * matrox_w1.c
*
* Copyright (c) 2004 Evgeniy Polyakov <johnpol@2ka.mipt.ru>
- *
+ *
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
.remove = __devexit_p(matrox_w1_remove),
};
-/*
+/*
* Matrox G400 DDC registers.
*/
struct matrox_device
{
- unsigned long base_addr;
- unsigned long port_index, port_data;
+ void __iomem *base_addr;
+ void __iomem *port_index;
+ void __iomem *port_data;
u8 data_mask;
- unsigned long phys_addr, virt_addr;
+ unsigned long phys_addr;
+ void __iomem *virt_addr;
unsigned long found;
struct w1_bus_master *bus_master;
dev->bus_master = (struct w1_bus_master *)(dev + 1);
- /*
- * True for G400, for some other we need resource 0, see drivers/video/matrox/matroxfb_base.c
+ /*
+ * True for G400, for some other we need resource 0, see drivers/video/matrox/matroxfb_base.c
*/
dev->phys_addr = pci_resource_start(pdev, 1);
- dev->virt_addr =
- (unsigned long) ioremap_nocache(dev->phys_addr, 16384);
+ dev->virt_addr = ioremap_nocache(dev->phys_addr, 16384);
if (!dev->virt_addr) {
dev_err(&pdev->dev, "%s: failed to ioremap(0x%lx, %d).\n",
__func__, dev->phys_addr, 16384);
if (dev->found) {
w1_remove_master_device(dev->bus_master);
- iounmap((void *) dev->virt_addr);
+ iounmap(dev->virt_addr);
}
kfree(dev);
}
static int __init matrox_w1_init(void)
{
- return pci_module_init(&matrox_w1_pci_driver);
+ return pci_register_driver(&matrox_w1_pci_driver);
}
static void __exit matrox_w1_fini(void)