imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int sharp_ls_connect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src;
   int r;
   src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
   if (IS_ERR(src)) {
     dev_err(dssdev->dev, "failed to find video source\n");
     return PTR_ERR(src);
   }
   r = omapdss_device_connect(src, dssdev);
   if (r) {
-    omap_dss_put_device(src);
+    omapdss_device_put(src);
     return r;
   }
   return 0;
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void sharp_ls_disconnect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src = dssdev->src;
   omapdss_device_disconnect(src, dssdev);
-  omap_dss_put_device(src);
+  omapdss_device_put(src);
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int acx565akm_connect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src;
   int r;
   src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
   if (IS_ERR(src)) {
     dev_err(dssdev->dev, "failed to find video source\n");
     return PTR_ERR(src);
   }
   r = omapdss_device_connect(src, dssdev);
   if (r) {
-    omap_dss_put_device(src);
+    omapdss_device_put(src);
     return r;
   }
   return 0;
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void acx565akm_disconnect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src = dssdev->src;
   omapdss_device_disconnect(src, dssdev);
-  omap_dss_put_device(src);
+  omapdss_device_put(src);
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int td028ttec1_panel_connect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src;
   int r;
   src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
   if (IS_ERR(src)) {
     dev_err(dssdev->dev, "failed to find video source\n");
     return PTR_ERR(src);
   }
   r = omapdss_device_connect(src, dssdev);
   if (r) {
-    omap_dss_put_device(src);
+    omapdss_device_put(src);
     return r;
   }
   return 0;
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void td028ttec1_panel_disconnect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src = dssdev->src;
   omapdss_device_disconnect(src, dssdev);
-  omap_dss_put_device(src);
+  omapdss_device_put(src);
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,15 +1,15 @@
 static int tpo_td043_connect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src;
   int r;
   src = omapdss_of_find_source_for_first_ep(dssdev->dev->of_node);
   if (IS_ERR(src)) {
     dev_err(dssdev->dev, "failed to find video source\n");
     return PTR_ERR(src);
   }
   r = omapdss_device_connect(src, dssdev);
   if (r) {
-    omap_dss_put_device(src);
+    omapdss_device_put(src);
     return r;
   }
   return 0;
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void tpo_td043_disconnect(struct omap_dss_device *dssdev) {
   struct omap_dss_device *src = dssdev->src;
   omapdss_device_disconnect(src, dssdev);
-  omap_dss_put_device(src);
+  omapdss_device_put(src);
 }<sep>@@
expression src;
@@
-       omap_dss_put_device
+       omapdss_device_put
	(src)
--- initial
+++ final
@@ -1,5 +1,4 @@
 static int bcm_sf2_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
+  struct bcm_sf2_priv *priv = dev_get_drvdata(dev);
   return dsa_switch_resume(priv->dev->ds);
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,5 +1,4 @@
 static int bcm_sf2_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct bcm_sf2_priv *priv = platform_get_drvdata(pdev);
+  struct bcm_sf2_priv *priv = dev_get_drvdata(dev);
   return dsa_switch_suspend(priv->dev->ds);
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int qca8k_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct qca8k_priv *priv = platform_get_drvdata(pdev);
+  struct qca8k_priv *priv = dev_get_drvdata(dev);
   qca8k_set_pm(priv, 1);
   return dsa_switch_resume(priv->ds);
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int qca8k_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct qca8k_priv *priv = platform_get_drvdata(pdev);
+  struct qca8k_priv *priv = dev_get_drvdata(dev);
   qca8k_set_pm(priv, 0);
   return dsa_switch_suspend(priv->ds);
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,17 +1,16 @@
 static int __maybe_unused macb_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *netdev = platform_get_drvdata(pdev);
+  struct net_device *netdev = dev_get_drvdata(dev);
   struct macb *bp = netdev_priv(netdev);
   if (bp->wol & MACB_WOL_ENABLED) {
     macb_writel(bp, IDR, MACB_BIT(WOL));
     macb_writel(bp, WOL, 0);
     disable_irq_wake(bp->queues[0].irq);
   } else {
     clk_prepare_enable(bp->pclk);
     clk_prepare_enable(bp->hclk);
     clk_prepare_enable(bp->tx_clk);
     clk_prepare_enable(bp->rx_clk);
   }
   netif_device_attach(netdev);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,18 +1,17 @@
 static int __maybe_unused macb_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *netdev = platform_get_drvdata(pdev);
+  struct net_device *netdev = dev_get_drvdata(dev);
   struct macb *bp = netdev_priv(netdev);
   netif_carrier_off(netdev);
   netif_device_detach(netdev);
   if (bp->wol & MACB_WOL_ENABLED) {
     macb_writel(bp, IER, MACB_BIT(WOL));
     macb_writel(bp, WOL, MACB_BIT(MAG));
     enable_irq_wake(bp->queues[0].irq);
   } else {
     clk_disable_unprepare(bp->tx_clk);
     clk_disable_unprepare(bp->hclk);
     clk_disable_unprepare(bp->pclk);
     clk_disable_unprepare(bp->rx_clk);
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,18 +1,17 @@
 static int dm9000_drv_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct board_info *db = netdev_priv(ndev);
   if (ndev) {
     if (netif_running(ndev)) {
       /* reset if we were not in wake mode to ensure if
        * the device was powered off it is in a known state */
       if (!db->wake_state) {
         dm9000_init_dm9000(ndev);
         dm9000_unmask_interrupts(db);
       }
       netif_device_attach(ndev);
     }
     db->in_suspend = 0;
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,14 +1,13 @@
 static int dm9000_drv_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct board_info *db;
   if (ndev) {
     db = netdev_priv(ndev);
     db->in_suspend = 1;
     if (!netif_running(ndev)) return 0;
     netif_device_detach(ndev);
     /* only shutdown if not using WoL */
     if (!db->wake_state) dm9000_shutdown(ndev);
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,12 +1,11 @@
 static int smc_drv_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   if (ndev) {
     if (netif_running(ndev)) {
       netif_device_detach(ndev);
       smc_shutdown(ndev);
       smc_phy_powerdown(ndev);
     }
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,19 +1,18 @@
 static int cpsw_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
   /* Select default pin state */
   pinctrl_pm_select_default_state(dev);
   /* shut up ASSERT_RTNL() warning in netif_set_real_num_tx/rx_queues */
   rtnl_lock();
   if (cpsw->data.dual_emac) {
     int i;
     for (i = 0; i < cpsw->data.slaves; i++) {
       if (netif_running(cpsw->slaves[i].ndev)) cpsw_ndo_open(cpsw->slaves[i].ndev);
     }
   } else {
     if (netif_running(ndev)) cpsw_ndo_open(ndev);
   }
   rtnl_unlock();
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,16 +1,15 @@
 static int cpsw_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct cpsw_common *cpsw = ndev_to_cpsw(ndev);
   if (cpsw->data.dual_emac) {
     int i;
     for (i = 0; i < cpsw->data.slaves; i++) {
       if (netif_running(cpsw->slaves[i].ndev)) cpsw_ndo_stop(cpsw->slaves[i].ndev);
     }
   } else {
     if (netif_running(ndev)) cpsw_ndo_stop(ndev);
   }
   /* Select sleep pin state */
   pinctrl_pm_select_sleep_state(dev);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int davinci_emac_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   if (netif_running(ndev)) emac_dev_open(ndev);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int davinci_emac_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   if (netif_running(ndev)) emac_dev_stop(ndev);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,12 +1,11 @@
 static int w5300_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct w5300_priv *priv = netdev_priv(ndev);
   if (!netif_running(ndev)) {
     w5300_hw_reset(priv);
     w5300_hw_start(priv);
     netif_device_attach(ndev);
     if (!gpio_is_valid(priv->link_gpio) || gpio_get_value(priv->link_gpio) != 0) netif_carrier_on(ndev);
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,11 +1,10 @@
 static int w5300_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct net_device *ndev = platform_get_drvdata(pdev);
+  struct net_device *ndev = dev_get_drvdata(dev);
   struct w5300_priv *priv = netdev_priv(ndev);
   if (netif_running(ndev)) {
     netif_carrier_off(ndev);
     netif_device_detach(ndev);
     w5300_hw_close(priv);
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int mdio_mux_iproc_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev);
+  struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
   clk_prepare_enable(md->core_clk);
   mdio_mux_iproc_config(md);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int mdio_mux_iproc_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct iproc_mdiomux_desc *md = platform_get_drvdata(pdev);
+  struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
   clk_disable_unprepare(md->core_clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,12 +1,11 @@
 static int ptp_dte_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct ptp_dte *ptp_dte = platform_get_drvdata(pdev);
+  struct ptp_dte *ptp_dte = dev_get_drvdata(dev);
   u8 i;
   for (i = 0; i < DTE_NUM_REGS_TO_RESTORE; i++) {
     if ((i * sizeof(u32)) != DTE_NCO_OVERFLOW_REG)
       writel(ptp_dte->reg_val[i], (ptp_dte->regs + (i * sizeof(u32))));
     else
       writel(((ptp_dte->reg_val[i] & DTE_NCO_SUM3_MASK) << DTE_NCO_SUM3_WR_SHIFT), (ptp_dte->regs + (i * sizeof(u32))));
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,11 +1,10 @@
 static int ptp_dte_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct ptp_dte *ptp_dte = platform_get_drvdata(pdev);
+  struct ptp_dte *ptp_dte = dev_get_drvdata(dev);
   u8 i;
   for (i = 0; i < DTE_NUM_REGS_TO_RESTORE; i++) {
     ptp_dte->reg_val[i] = readl(ptp_dte->regs + (i * sizeof(u32)));
   }
   /* disable the nco */
   writel(0, ptp_dte->regs + DTE_NCO_INC_REG);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,41 +1,40 @@
 static int ds1685_rtc_proc(struct device *dev, struct seq_file *seq) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct ds1685_priv *rtc = platform_get_drvdata(pdev);
+  struct ds1685_priv *rtc = dev_get_drvdata(dev);
   u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
   char *model;
   /* Read all the relevant data from the control registers. */
   ds1685_rtc_switch_to_bank1(rtc);
   ds1685_rtc_get_ssn(rtc, ssn);
   ctrla = rtc->read(rtc, RTC_CTRL_A);
   ctrlb = rtc->read(rtc, RTC_CTRL_B);
   ctrlc = rtc->read(rtc, RTC_CTRL_C);
   ctrld = rtc->read(rtc, RTC_CTRL_D);
   ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A);
   ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B);
   ds1685_rtc_switch_to_bank0(rtc);
   /* Determine the RTC model. */
   switch (ssn[0]) {
   case RTC_MODEL_DS1685: model = "DS1685/DS1687\0"; break;
   case RTC_MODEL_DS1689: model = "DS1689/DS1693\0"; break;
   case RTC_MODEL_DS17285: model = "DS17285/DS17287\0"; break;
   case RTC_MODEL_DS17485: model = "DS17485/DS17487\0"; break;
   case RTC_MODEL_DS17885: model = "DS17885/DS17887\0"; break;
   default: model = "Unknown\0"; break;
   }
   /* Print out the information. */
   seq_printf(seq,
              "Model\t\t: %s\n"
              "Oscillator\t: %s\n"
              "12/24hr\t\t: %s\n"
              "DST\t\t: %s\n"
              "Data mode\t: %s\n"
              "Battery\t\t: %s\n"
              "Aux batt\t: %s\n"
              "Update IRQ\t: %s\n"
              "Periodic IRQ\t: %s\n"
              "Periodic Rate\t: %s\n"
              "SQW Freq\t: %s\n"
              "Serial #\t: %8phC\n",
              model, ((ctrla & RTC_CTRL_A_DV1) ? "enabled" : "disabled"), ((ctrlb & RTC_CTRL_B_2412) ? "24-hour" : "12-hour"), ((ctrlb & RTC_CTRL_B_DSE) ? "enabled" : "disabled"), ((ctrlb & RTC_CTRL_B_DM) ? "binary" : "BCD"), ((ctrld & RTC_CTRL_D_VRT) ? "ok" : "exhausted or n/a"), ((ctrl4a & RTC_CTRL_4A_VRT2) ? "ok" : "exhausted or n/a"), ((ctrlb & RTC_CTRL_B_UIE) ? "yes" : "no"), ((ctrlb & RTC_CTRL_B_PIE) ? "yes" : "no"), (!(ctrl4b & RTC_CTRL_4B_E32K) ? ds1685_rtc_pirq_rate[(ctrla & RTC_CTRL_A_RS_MASK)] : "none"), (!((ctrl4b & RTC_CTRL_4B_E32K)) ? ds1685_rtc_sqw_freq[(ctrla & RTC_CTRL_A_RS_MASK)] : "32768Hz"), ssn);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,4 +1,4 @@
 static void notify_and_destroy(struct net *net, struct sk_buff *skb, struct nlmsghdr *n, u32 clid, struct Qdisc *old, struct Qdisc *new) {
   if (new || old) qdisc_notify(net, skb, n, clid, old, new);
-  if (old) qdisc_destroy(old);
+  if (old) qdisc_put(old);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,53 +1,53 @@
 static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, struct sk_buff *skb, struct nlmsghdr *n, u32 classid, struct Qdisc *new, struct Qdisc *old, struct netlink_ext_ack *extack) {
   struct Qdisc *q = old;
   struct net *net = dev_net(dev);
   int err = 0;
   if (parent == NULL) {
     unsigned int i, num_q, ingress;
     ingress = 0;
     num_q = dev->num_tx_queues;
     if ((q && q->flags & TCQ_F_INGRESS) || (new && new->flags &TCQ_F_INGRESS)) {
       num_q = 1;
       ingress = 1;
       if (!dev_ingress_queue(dev)) {
         NL_SET_ERR_MSG(extack, "Device does not have an ingress queue");
         return -ENOENT;
       }
     }
     if (dev->flags & IFF_UP) dev_deactivate(dev);
     if (new && new->ops->attach) goto skip;
     for (i = 0; i < num_q; i++) {
       struct netdev_queue *dev_queue = dev_ingress_queue(dev);
       if (!ingress) dev_queue = netdev_get_tx_queue(dev, i);
       old = dev_graft_qdisc(dev_queue, new);
       if (new &&i > 0) qdisc_refcount_inc(new);
-      if (!ingress) qdisc_destroy(old);
+      if (!ingress) qdisc_put(old);
     }
   skip:
     if (!ingress) {
       notify_and_destroy(net, skb, n, classid, dev->qdisc, new);
       if (new && !new->ops->attach) qdisc_refcount_inc(new);
       dev->qdisc = new ?: &noop_qdisc;
       if (new && new->ops->attach) new->ops->attach(new);
     } else {
       notify_and_destroy(net, skb, n, classid, old, new);
     }
     if (dev->flags & IFF_UP) dev_activate(dev);
   } else {
     const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
     /* Only support running class lockless if parent is lockless */
     if (new && (new->flags &TCQ_F_NOLOCK) && parent && !(parent->flags & TCQ_F_NOLOCK)) new->flags &= ~TCQ_F_NOLOCK;
     err = -EOPNOTSUPP;
     if (cops && cops->graft) {
       unsigned long cl = cops->find(parent, classid);
       if (cl) {
         err = cops->graft(parent, cl, new, &old, extack);
       } else {
         NL_SET_ERR_MSG(extack, "Specified class not found");
         err = -ENOENT;
       }
     }
     if (!err) notify_and_destroy(net, skb, n, classid, old, new);
   }
   return err;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,22 +1,22 @@
 static void atm_tc_put(struct Qdisc *sch, unsigned long cl) {
   struct atm_qdisc_data *p = qdisc_priv(sch);
   struct atm_flow_data *flow = (struct atm_flow_data *)cl;
   pr_debug("atm_tc_put(sch %p,[qdisc %p],flow %p)\n", sch, p, flow);
   if (--flow->ref) return;
   pr_debug("atm_tc_put: destroying\n");
   list_del_init(&flow->list);
   pr_debug("atm_tc_put: qdisc %p\n", flow->q);
-  qdisc_destroy(flow->q);
+  qdisc_put(flow->q);
   tcf_block_put(flow->block);
   if (flow->sock) {
     pr_debug("atm_tc_put: f_count %ld\n", file_count(flow->sock->file));
     flow->vcc->pop = flow->old_pop;
     sockfd_put(flow->sock);
   }
   if (flow->excess) atm_tc_put(sch, (unsigned long)flow->excess);
   if (flow != &p->link) kfree(flow);
   /*
    * If flow == &p->link, the qdisc no longer works at this point and
    * needs to be removed. (By the caller of atm_tc_put.)
    */
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);