X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fw1%2Fmatrox_w1.c;h=0b03f8f93f634e3459c946287bbed20089900173;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=55b1faf013093d18252a4e0d41447ee1032ba3f4;hpb=379a02f75c9f9f3ebff2c50c5ca685fbeae84499;p=linux-2.6.git diff --git a/drivers/w1/matrox_w1.c b/drivers/w1/matrox_w1.c index 55b1faf01..0b03f8f93 100644 --- a/drivers/w1/matrox_w1.c +++ b/drivers/w1/matrox_w1.c @@ -1,8 +1,8 @@ /* - * matrox_w1.c + * matrox_w1.c * * Copyright (c) 2004 Evgeniy Polyakov - * + * * * 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 @@ -22,8 +22,8 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ static struct pci_driver matrox_w1_pci_driver = { .remove = __devexit_p(matrox_w1_remove), }; -/* +/* * Matrox G400 DDC registers. */ @@ -78,11 +78,13 @@ static struct pci_driver matrox_w1_pci_driver = { 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; @@ -94,7 +96,7 @@ static void matrox_w1_write_ddc_bit(unsigned long, u8); /* * These functions read and write DDC Data bit. * - * Using tristate pins, since i can't fin any open-drain pin in whole motherboard. + * Using tristate pins, since i can't find any open-drain pin in whole motherboard. * Unfortunately we can't connect to Intel's 82801xx IO controller * since we don't know motherboard schema, wich has pretty unused(may be not) GPIO. * @@ -175,14 +177,13 @@ static int __devinit matrox_w1_probe(struct pci_dev *pdev, const struct pci_devi 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); @@ -227,14 +228,14 @@ static void __devexit matrox_w1_remove(struct pci_dev *pdev) 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)