]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/i2c/busses/i2c-ibm_iic.c
of: Remove duplicate fields from of_platform_driver
[net-next-2.6.git] / drivers / i2c / busses / i2c-ibm_iic.c
index e4476743f20330e4653e856ff42cee68b8952469..3876f993fe764e956b928b01b39e3c4eda5c55e1 100644 (file)
@@ -85,10 +85,11 @@ static void dump_iic_regs(const char* header, struct ibm_iic_private* dev)
 {
        volatile struct iic_regs __iomem *iic = dev->vaddr;
        printk(KERN_DEBUG "ibm-iic%d: %s\n", dev->idx, header);
-       printk(KERN_DEBUG "  cntl     = 0x%02x, mdcntl = 0x%02x\n"
-              KERN_DEBUG "  sts      = 0x%02x, extsts = 0x%02x\n"
-              KERN_DEBUG "  clkdiv   = 0x%02x, xfrcnt = 0x%02x\n"
-              KERN_DEBUG "  xtcntlss = 0x%02x, directcntl = 0x%02x\n",
+       printk(KERN_DEBUG
+              "  cntl     = 0x%02x, mdcntl = 0x%02x\n"
+              "  sts      = 0x%02x, extsts = 0x%02x\n"
+              "  clkdiv   = 0x%02x, xfrcnt = 0x%02x\n"
+              "  xtcntlss = 0x%02x, directcntl = 0x%02x\n",
                in_8(&iic->cntl), in_8(&iic->mdcntl), in_8(&iic->sts),
                in_8(&iic->extsts), in_8(&iic->clkdiv), in_8(&iic->xfrcnt),
                in_8(&iic->xtcntlss), in_8(&iic->directcntl));
@@ -663,7 +664,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
 static int __devinit iic_request_irq(struct of_device *ofdev,
                                     struct ibm_iic_private *dev)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        int irq;
 
        if (iic_force_poll)
@@ -694,7 +695,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
 static int __devinit iic_probe(struct of_device *ofdev,
                               const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct ibm_iic_private *dev;
        struct i2c_adapter *adap;
        const u32 *freq;
@@ -806,8 +807,11 @@ static const struct of_device_id ibm_iic_match[] = {
 };
 
 static struct of_platform_driver ibm_iic_driver = {
-       .name   = "ibm-iic",
-       .match_table = ibm_iic_match,
+       .driver = {
+               .name = "ibm-iic",
+               .owner = THIS_MODULE,
+               .of_match_table = ibm_iic_match,
+       },
        .probe  = iic_probe,
        .remove = __devexit_p(iic_remove),
 };