diff options
author | George Cherian <george.cherian@ti.com> | 2014-05-12 00:51:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-15 13:42:14 -0400 |
commit | 88c99ff639aee9a5c37b796340a8fc9973bf86cb (patch) | |
tree | 71bbd1ab4153d728be6afa28f6a88f1d23e748bc | |
parent | eb02a272c97b6e25d8e5fcf1ea93923e6f155595 (diff) |
driver net: cpsw: Convert pr_*() to dev_*() calls
Convert all pr_*() calls to dev_*() calls.
No functional changes.
Signed-off-by: George Cherian <george.cherian@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index e3d871055d63..52bcc5d9bc67 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -1808,25 +1808,25 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1808 | return -EINVAL; | 1808 | return -EINVAL; |
1809 | 1809 | ||
1810 | if (of_property_read_u32(node, "slaves", &prop)) { | 1810 | if (of_property_read_u32(node, "slaves", &prop)) { |
1811 | pr_err("Missing slaves property in the DT.\n"); | 1811 | dev_err(&pdev->dev, "Missing slaves property in the DT.\n"); |
1812 | return -EINVAL; | 1812 | return -EINVAL; |
1813 | } | 1813 | } |
1814 | data->slaves = prop; | 1814 | data->slaves = prop; |
1815 | 1815 | ||
1816 | if (of_property_read_u32(node, "active_slave", &prop)) { | 1816 | if (of_property_read_u32(node, "active_slave", &prop)) { |
1817 | pr_err("Missing active_slave property in the DT.\n"); | 1817 | dev_err(&pdev->dev, "Missing active_slave property in the DT.\n"); |
1818 | return -EINVAL; | 1818 | return -EINVAL; |
1819 | } | 1819 | } |
1820 | data->active_slave = prop; | 1820 | data->active_slave = prop; |
1821 | 1821 | ||
1822 | if (of_property_read_u32(node, "cpts_clock_mult", &prop)) { | 1822 | if (of_property_read_u32(node, "cpts_clock_mult", &prop)) { |
1823 | pr_err("Missing cpts_clock_mult property in the DT.\n"); | 1823 | dev_err(&pdev->dev, "Missing cpts_clock_mult property in the DT.\n"); |
1824 | return -EINVAL; | 1824 | return -EINVAL; |
1825 | } | 1825 | } |
1826 | data->cpts_clock_mult = prop; | 1826 | data->cpts_clock_mult = prop; |
1827 | 1827 | ||
1828 | if (of_property_read_u32(node, "cpts_clock_shift", &prop)) { | 1828 | if (of_property_read_u32(node, "cpts_clock_shift", &prop)) { |
1829 | pr_err("Missing cpts_clock_shift property in the DT.\n"); | 1829 | dev_err(&pdev->dev, "Missing cpts_clock_shift property in the DT.\n"); |
1830 | return -EINVAL; | 1830 | return -EINVAL; |
1831 | } | 1831 | } |
1832 | data->cpts_clock_shift = prop; | 1832 | data->cpts_clock_shift = prop; |
@@ -1838,31 +1838,31 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1838 | return -ENOMEM; | 1838 | return -ENOMEM; |
1839 | 1839 | ||
1840 | if (of_property_read_u32(node, "cpdma_channels", &prop)) { | 1840 | if (of_property_read_u32(node, "cpdma_channels", &prop)) { |
1841 | pr_err("Missing cpdma_channels property in the DT.\n"); | 1841 | dev_err(&pdev->dev, "Missing cpdma_channels property in the DT.\n"); |
1842 | return -EINVAL; | 1842 | return -EINVAL; |
1843 | } | 1843 | } |
1844 | data->channels = prop; | 1844 | data->channels = prop; |
1845 | 1845 | ||
1846 | if (of_property_read_u32(node, "ale_entries", &prop)) { | 1846 | if (of_property_read_u32(node, "ale_entries", &prop)) { |
1847 | pr_err("Missing ale_entries property in the DT.\n"); | 1847 | dev_err(&pdev->dev, "Missing ale_entries property in the DT.\n"); |
1848 | return -EINVAL; | 1848 | return -EINVAL; |
1849 | } | 1849 | } |
1850 | data->ale_entries = prop; | 1850 | data->ale_entries = prop; |
1851 | 1851 | ||
1852 | if (of_property_read_u32(node, "bd_ram_size", &prop)) { | 1852 | if (of_property_read_u32(node, "bd_ram_size", &prop)) { |
1853 | pr_err("Missing bd_ram_size property in the DT.\n"); | 1853 | dev_err(&pdev->dev, "Missing bd_ram_size property in the DT.\n"); |
1854 | return -EINVAL; | 1854 | return -EINVAL; |
1855 | } | 1855 | } |
1856 | data->bd_ram_size = prop; | 1856 | data->bd_ram_size = prop; |
1857 | 1857 | ||
1858 | if (of_property_read_u32(node, "rx_descs", &prop)) { | 1858 | if (of_property_read_u32(node, "rx_descs", &prop)) { |
1859 | pr_err("Missing rx_descs property in the DT.\n"); | 1859 | dev_err(&pdev->dev, "Missing rx_descs property in the DT.\n"); |
1860 | return -EINVAL; | 1860 | return -EINVAL; |
1861 | } | 1861 | } |
1862 | data->rx_descs = prop; | 1862 | data->rx_descs = prop; |
1863 | 1863 | ||
1864 | if (of_property_read_u32(node, "mac_control", &prop)) { | 1864 | if (of_property_read_u32(node, "mac_control", &prop)) { |
1865 | pr_err("Missing mac_control property in the DT.\n"); | 1865 | dev_err(&pdev->dev, "Missing mac_control property in the DT.\n"); |
1866 | return -EINVAL; | 1866 | return -EINVAL; |
1867 | } | 1867 | } |
1868 | data->mac_control = prop; | 1868 | data->mac_control = prop; |
@@ -1876,7 +1876,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1876 | ret = of_platform_populate(node, NULL, NULL, &pdev->dev); | 1876 | ret = of_platform_populate(node, NULL, NULL, &pdev->dev); |
1877 | /* We do not want to force this, as in some cases may not have child */ | 1877 | /* We do not want to force this, as in some cases may not have child */ |
1878 | if (ret) | 1878 | if (ret) |
1879 | pr_warn("Doesn't have any child node\n"); | 1879 | dev_warn(&pdev->dev, "Doesn't have any child node\n"); |
1880 | 1880 | ||
1881 | for_each_child_of_node(node, slave_node) { | 1881 | for_each_child_of_node(node, slave_node) { |
1882 | struct cpsw_slave_data *slave_data = data->slave_data + i; | 1882 | struct cpsw_slave_data *slave_data = data->slave_data + i; |
@@ -1893,7 +1893,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1893 | 1893 | ||
1894 | parp = of_get_property(slave_node, "phy_id", &lenp); | 1894 | parp = of_get_property(slave_node, "phy_id", &lenp); |
1895 | if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) { | 1895 | if ((parp == NULL) || (lenp != (sizeof(void *) * 2))) { |
1896 | pr_err("Missing slave[%d] phy_id property\n", i); | 1896 | dev_err(&pdev->dev, "Missing slave[%d] phy_id property\n", i); |
1897 | return -EINVAL; | 1897 | return -EINVAL; |
1898 | } | 1898 | } |
1899 | mdio_node = of_find_node_by_phandle(be32_to_cpup(parp)); | 1899 | mdio_node = of_find_node_by_phandle(be32_to_cpup(parp)); |
@@ -1913,18 +1913,18 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1913 | 1913 | ||
1914 | slave_data->phy_if = of_get_phy_mode(slave_node); | 1914 | slave_data->phy_if = of_get_phy_mode(slave_node); |
1915 | if (slave_data->phy_if < 0) { | 1915 | if (slave_data->phy_if < 0) { |
1916 | pr_err("Missing or malformed slave[%d] phy-mode property\n", | 1916 | dev_err(&pdev->dev, "Missing or malformed slave[%d] phy-mode property\n", |
1917 | i); | 1917 | i); |
1918 | return slave_data->phy_if; | 1918 | return slave_data->phy_if; |
1919 | } | 1919 | } |
1920 | 1920 | ||
1921 | if (data->dual_emac) { | 1921 | if (data->dual_emac) { |
1922 | if (of_property_read_u32(slave_node, "dual_emac_res_vlan", | 1922 | if (of_property_read_u32(slave_node, "dual_emac_res_vlan", |
1923 | &prop)) { | 1923 | &prop)) { |
1924 | pr_err("Missing dual_emac_res_vlan in DT.\n"); | 1924 | dev_err(&pdev->dev, "Missing dual_emac_res_vlan in DT.\n"); |
1925 | slave_data->dual_emac_res_vlan = i+1; | 1925 | slave_data->dual_emac_res_vlan = i+1; |
1926 | pr_err("Using %d as Reserved VLAN for %d slave\n", | 1926 | dev_err(&pdev->dev, "Using %d as Reserved VLAN for %d slave\n", |
1927 | slave_data->dual_emac_res_vlan, i); | 1927 | slave_data->dual_emac_res_vlan, i); |
1928 | } else { | 1928 | } else { |
1929 | slave_data->dual_emac_res_vlan = prop; | 1929 | slave_data->dual_emac_res_vlan = prop; |
1930 | } | 1930 | } |
@@ -1948,7 +1948,7 @@ static int cpsw_probe_dual_emac(struct platform_device *pdev, | |||
1948 | 1948 | ||
1949 | ndev = alloc_etherdev(sizeof(struct cpsw_priv)); | 1949 | ndev = alloc_etherdev(sizeof(struct cpsw_priv)); |
1950 | if (!ndev) { | 1950 | if (!ndev) { |
1951 | pr_err("cpsw: error allocating net_device\n"); | 1951 | dev_err(&pdev->dev, "cpsw: error allocating net_device\n"); |
1952 | return -ENOMEM; | 1952 | return -ENOMEM; |
1953 | } | 1953 | } |
1954 | 1954 | ||
@@ -1964,10 +1964,10 @@ static int cpsw_probe_dual_emac(struct platform_device *pdev, | |||
1964 | if (is_valid_ether_addr(data->slave_data[1].mac_addr)) { | 1964 | if (is_valid_ether_addr(data->slave_data[1].mac_addr)) { |
1965 | memcpy(priv_sl2->mac_addr, data->slave_data[1].mac_addr, | 1965 | memcpy(priv_sl2->mac_addr, data->slave_data[1].mac_addr, |
1966 | ETH_ALEN); | 1966 | ETH_ALEN); |
1967 | pr_info("cpsw: Detected MACID = %pM\n", priv_sl2->mac_addr); | 1967 | dev_info(&pdev->dev, "cpsw: Detected MACID = %pM\n", priv_sl2->mac_addr); |
1968 | } else { | 1968 | } else { |
1969 | random_ether_addr(priv_sl2->mac_addr); | 1969 | random_ether_addr(priv_sl2->mac_addr); |
1970 | pr_info("cpsw: Random MACID = %pM\n", priv_sl2->mac_addr); | 1970 | dev_info(&pdev->dev, "cpsw: Random MACID = %pM\n", priv_sl2->mac_addr); |
1971 | } | 1971 | } |
1972 | memcpy(ndev->dev_addr, priv_sl2->mac_addr, ETH_ALEN); | 1972 | memcpy(ndev->dev_addr, priv_sl2->mac_addr, ETH_ALEN); |
1973 | 1973 | ||
@@ -2005,7 +2005,7 @@ static int cpsw_probe_dual_emac(struct platform_device *pdev, | |||
2005 | SET_NETDEV_DEV(ndev, &pdev->dev); | 2005 | SET_NETDEV_DEV(ndev, &pdev->dev); |
2006 | ret = register_netdev(ndev); | 2006 | ret = register_netdev(ndev); |
2007 | if (ret) { | 2007 | if (ret) { |
2008 | pr_err("cpsw: error registering net device\n"); | 2008 | dev_err(&pdev->dev, "cpsw: error registering net device\n"); |
2009 | free_netdev(ndev); | 2009 | free_netdev(ndev); |
2010 | ret = -ENODEV; | 2010 | ret = -ENODEV; |
2011 | } | 2011 | } |
@@ -2027,7 +2027,7 @@ static int cpsw_probe(struct platform_device *pdev) | |||
2027 | 2027 | ||
2028 | ndev = alloc_etherdev(sizeof(struct cpsw_priv)); | 2028 | ndev = alloc_etherdev(sizeof(struct cpsw_priv)); |
2029 | if (!ndev) { | 2029 | if (!ndev) { |
2030 | pr_err("error allocating net_device\n"); | 2030 | dev_err(&pdev->dev, "error allocating net_device\n"); |
2031 | return -ENOMEM; | 2031 | return -ENOMEM; |
2032 | } | 2032 | } |
2033 | 2033 | ||
@@ -2042,7 +2042,7 @@ static int cpsw_probe(struct platform_device *pdev) | |||
2042 | priv->cpts = devm_kzalloc(&pdev->dev, sizeof(struct cpts), GFP_KERNEL); | 2042 | priv->cpts = devm_kzalloc(&pdev->dev, sizeof(struct cpts), GFP_KERNEL); |
2043 | priv->irq_enabled = true; | 2043 | priv->irq_enabled = true; |
2044 | if (!priv->cpts) { | 2044 | if (!priv->cpts) { |
2045 | pr_err("error allocating cpts\n"); | 2045 | dev_err(&pdev->dev, "error allocating cpts\n"); |
2046 | goto clean_ndev_ret; | 2046 | goto clean_ndev_ret; |
2047 | } | 2047 | } |
2048 | 2048 | ||
@@ -2055,7 +2055,7 @@ static int cpsw_probe(struct platform_device *pdev) | |||
2055 | pinctrl_pm_select_default_state(&pdev->dev); | 2055 | pinctrl_pm_select_default_state(&pdev->dev); |
2056 | 2056 | ||
2057 | if (cpsw_probe_dt(&priv->data, pdev)) { | 2057 | if (cpsw_probe_dt(&priv->data, pdev)) { |
2058 | pr_err("cpsw: platform data missing\n"); | 2058 | dev_err(&pdev->dev, "cpsw: platform data missing\n"); |
2059 | ret = -ENODEV; | 2059 | ret = -ENODEV; |
2060 | goto clean_runtime_disable_ret; | 2060 | goto clean_runtime_disable_ret; |
2061 | } | 2061 | } |
@@ -2063,10 +2063,10 @@ static int cpsw_probe(struct platform_device *pdev) | |||
2063 | 2063 | ||
2064 | if (is_valid_ether_addr(data->slave_data[0].mac_addr)) { | 2064 | if (is_valid_ether_addr(data->slave_data[0].mac_addr)) { |
2065 | memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN); | 2065 | memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN); |
2066 | pr_info("Detected MACID = %pM\n", priv->mac_addr); | 2066 | dev_info(&pdev->dev, "Detected MACID = %pM\n", priv->mac_addr); |
2067 | } else { | 2067 | } else { |
2068 | eth_random_addr(priv->mac_addr); | 2068 | eth_random_addr(priv->mac_addr); |
2069 | pr_info("Random MACID = %pM\n", priv->mac_addr); | 2069 | dev_info(&pdev->dev, "Random MACID = %pM\n", priv->mac_addr); |
2070 | } | 2070 | } |
2071 | 2071 | ||
2072 | memcpy(ndev->dev_addr, priv->mac_addr, ETH_ALEN); | 2072 | memcpy(ndev->dev_addr, priv->mac_addr, ETH_ALEN); |