if (!drv->probe)
                return error;
 
-       of_dev_get(of_dev);
+       get_device(dev);
 
        if (of_driver_match_device(dev, dev->driver))
                error = drv->probe(of_dev);
        if (error)
-               of_dev_put(of_dev);
+               put_device(dev);
 
        return error;
 }
 
 #include <linux/of_irq.h>
 #include <linux/of_net.h>
 #include <linux/of_mdio.h>
+#include <linux/platform_device.h>
 #include <linux/slab.h>
 
 #include <asm/processor.h>
 
 static void emac_put_deps(struct emac_instance *dev)
 {
-       of_dev_put(dev->mal_dev);
-       of_dev_put(dev->zmii_dev);
-       of_dev_put(dev->rgmii_dev);
-       of_dev_put(dev->mdio_dev);
-       of_dev_put(dev->tah_dev);
+       platform_device_put(dev->mal_dev);
+       platform_device_put(dev->zmii_dev);
+       platform_device_put(dev->rgmii_dev);
+       platform_device_put(dev->mdio_dev);
+       platform_device_put(dev->tah_dev);
 }
 
 static int emac_of_bus_notify(struct notifier_block *nb, unsigned long action,
        for (i = 0; i < EMAC_DEP_COUNT; i++) {
                of_node_put(deps[i].node);
                if (err)
-                       of_dev_put(deps[i].ofdev);
+                       platform_device_put(deps[i].ofdev);
        }
        if (err == 0) {
                dev->mal_dev = deps[EMAC_DEP_MAL_IDX].ofdev;
                dev->tah_dev = deps[EMAC_DEP_TAH_IDX].ofdev;
                dev->mdio_dev = deps[EMAC_DEP_MDIO_IDX].ofdev;
        }
-       of_dev_put(deps[EMAC_DEP_PREV_IDX].ofdev);
+       platform_device_put(deps[EMAC_DEP_PREV_IDX].ofdev);
        return err;
 }
 
 
 }
 EXPORT_SYMBOL(of_match_device);
 
-struct platform_device *of_dev_get(struct platform_device *dev)
-{
-       struct device *tmp;
-
-       if (!dev)
-               return NULL;
-       tmp = get_device(&dev->dev);
-       if (tmp)
-               return to_platform_device(tmp);
-       else
-               return NULL;
-}
-EXPORT_SYMBOL(of_dev_get);
-
-void of_dev_put(struct platform_device *dev)
-{
-       if (dev)
-               put_device(&dev->dev);
-}
-EXPORT_SYMBOL(of_dev_put);
-
 int of_device_add(struct platform_device *ofdev)
 {
        BUG_ON(ofdev->dev.of_node == NULL);
 
                pdev_parent = of_find_device_by_node(rd->dn->parent);
                pdev = of_platform_device_create(rd->dn, NULL,
                                pdev_parent ? &pdev_parent->dev : NULL);
-               of_dev_put(pdev_parent);
+               platform_device_put(pdev_parent);
 
                if (pdev == NULL) {
                        pr_err("%s: failed to create for '%pOF'\n",
                of_platform_device_destroy(&pdev->dev, &children_left);
 
                /* and put the reference of the find */
-               of_dev_put(pdev);
+               platform_device_put(pdev);
                break;
        }
 
 
                        unittest(pdev,
                                 "Could not create device for node '%pOFn'\n",
                                 grandchild);
-                       of_dev_put(pdev);
+                       platform_device_put(pdev);
                }
        }
 
 
 
        dwc3_data->dr_mode = usb_get_dr_mode(&child_pdev->dev);
        of_node_put(child);
-       of_dev_put(child_pdev);
+       platform_device_put(child_pdev);
 
        /*
         * Configure the USB port as device or host according to the static
 
        return of_match_device(drv->of_match_table, dev) != NULL;
 }
 
-extern struct platform_device *of_dev_get(struct platform_device *dev);
-extern void of_dev_put(struct platform_device *dev);
-
 extern int of_device_add(struct platform_device *pdev);
 extern int of_device_register(struct platform_device *ofdev);
 extern void of_device_unregister(struct platform_device *ofdev);
 
 if (id == NULL || ...) { ... return ...; }
 ... when != put_device(&id->dev)
     when != platform_device_put(id)
-    when != of_dev_put(id)
     when != if (id) { ... put_device(&id->dev) ... }
     when != e1 = (T)id
     when != e1 = (T)(&id->dev)