You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
i2c: don't print error when adding adapter fails
The core will do this for us now. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Peter Korsgaard <peter@korsgaard.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Thierry Reding <treding@nvidia.com> Acked-by: Ray Jui <ray.jui@broadcom.com> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
committed by
Wolfram Sang
parent
fa8410b355
commit
ea734404f3
@@ -378,11 +378,8 @@ static int amd756_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
amd756_ioport);
|
||||
|
||||
error = i2c_add_adapter(&amd756_smbus);
|
||||
if (error) {
|
||||
dev_err(&pdev->dev,
|
||||
"Adapter registration failed, module not inserted\n");
|
||||
if (error)
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1122,8 +1122,6 @@ static int at91_twi_probe(struct platform_device *pdev)
|
||||
|
||||
rc = i2c_add_numbered_adapter(&dev->adapter);
|
||||
if (rc) {
|
||||
dev_err(dev->dev, "Adapter %s registration failed\n",
|
||||
dev->adapter.name);
|
||||
clk_disable_unprepare(dev->clk);
|
||||
|
||||
pm_runtime_disable(dev->dev);
|
||||
|
||||
@@ -558,13 +558,7 @@ static int axxia_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, idev);
|
||||
|
||||
ret = i2c_add_adapter(&idev->adapter);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to add adapter\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return i2c_add_adapter(&idev->adapter);
|
||||
}
|
||||
|
||||
static int axxia_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
@@ -488,13 +488,7 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev)
|
||||
adap->dev.parent = &pdev->dev;
|
||||
adap->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
ret = i2c_add_adapter(adap);
|
||||
if (ret) {
|
||||
dev_err(iproc_i2c->device, "failed to add adapter\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return i2c_add_adapter(adap);
|
||||
}
|
||||
|
||||
static int bcm_iproc_i2c_remove(struct platform_device *pdev)
|
||||
|
||||
@@ -858,10 +858,8 @@ static int bcm_kona_i2c_probe(struct platform_device *pdev)
|
||||
adap->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
rc = i2c_add_adapter(adap);
|
||||
if (rc) {
|
||||
dev_err(dev->device, "failed to add adapter\n");
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
dev_info(dev->device, "device registered successfully\n");
|
||||
|
||||
|
||||
@@ -685,10 +685,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev)
|
||||
write_CONTROL(iface, read_CONTROL(iface) | TWI_ENA);
|
||||
|
||||
rc = i2c_add_numbered_adapter(p_adap);
|
||||
if (rc < 0) {
|
||||
dev_err(&pdev->dev, "Can't add i2c adapter!\n");
|
||||
if (rc < 0)
|
||||
goto out_error;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, iface);
|
||||
|
||||
|
||||
@@ -648,10 +648,8 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)
|
||||
adap->dev.parent = &pdev->dev;
|
||||
adap->dev.of_node = pdev->dev.of_node;
|
||||
rc = i2c_add_adapter(adap);
|
||||
if (rc) {
|
||||
dev_err(dev->device, "failed to add adapter\n");
|
||||
if (rc)
|
||||
goto probe_errorout;
|
||||
}
|
||||
|
||||
dev_info(dev->device, "%s@%dhz registered in %s mode\n",
|
||||
int_name ? int_name : " ", dev->clk_freq_hz,
|
||||
|
||||
@@ -963,10 +963,8 @@ static int cdns_i2c_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ret = i2c_add_adapter(&id->adap);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "reg adap failed: %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto err_clk_dis;
|
||||
}
|
||||
|
||||
/*
|
||||
* Cadence I2C controller has a bug wherein it generates
|
||||
|
||||
@@ -665,10 +665,8 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
|
||||
cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1;
|
||||
result = i2c_add_numbered_adapter(&cpm->adap);
|
||||
|
||||
if (result < 0) {
|
||||
dev_err(&ofdev->dev, "Unable to register with I2C\n");
|
||||
if (result < 0)
|
||||
goto out_shut;
|
||||
}
|
||||
|
||||
dev_dbg(&ofdev->dev, "hw routines for %s registered.\n",
|
||||
cpm->adap.name);
|
||||
|
||||
@@ -281,10 +281,8 @@ static int ec_i2c_probe(struct platform_device *pdev)
|
||||
bus->adap.retries = I2C_MAX_RETRIES;
|
||||
|
||||
err = i2c_add_adapter(&bus->adap);
|
||||
if (err) {
|
||||
dev_err(dev, "cannot register i2c adapter\n");
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
platform_set_drvdata(pdev, bus);
|
||||
|
||||
return err;
|
||||
|
||||
@@ -846,10 +846,8 @@ static int davinci_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
adap->nr = pdev->id;
|
||||
r = i2c_add_numbered_adapter(adap);
|
||||
if (r) {
|
||||
dev_err(&pdev->dev, "failure adding adapter\n");
|
||||
if (r)
|
||||
goto err_unuse_clocks;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -487,10 +487,8 @@ static int diolan_u2c_probe(struct usb_interface *interface,
|
||||
|
||||
/* and finally attach to i2c layer */
|
||||
ret = i2c_add_adapter(&dev->adapter);
|
||||
if (ret < 0) {
|
||||
dev_err(&interface->dev, "failed to add I2C adapter\n");
|
||||
if (ret < 0)
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
dev_dbg(&interface->dev, "connected " DRIVER_NAME "\n");
|
||||
|
||||
|
||||
@@ -228,10 +228,8 @@ static int dln2_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
/* and finally attach to i2c layer */
|
||||
ret = i2c_add_adapter(&dln2->adapter);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to add I2C adapter: %d\n", ret);
|
||||
if (ret < 0)
|
||||
goto out_disable;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -438,7 +438,6 @@ static int efm32_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
ret = i2c_add_adapter(&ddata->adapter);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to add i2c adapter (%d)\n", ret);
|
||||
free_irq(ddata->irq, ddata);
|
||||
|
||||
err_disable_clk:
|
||||
|
||||
@@ -796,10 +796,8 @@ static int exynos5_i2c_probe(struct platform_device *pdev)
|
||||
exynos5_i2c_reset(i2c);
|
||||
|
||||
ret = i2c_add_adapter(&i2c->adap);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to add bus to i2c core\n");
|
||||
if (ret < 0)
|
||||
goto err_clk;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, i2c);
|
||||
|
||||
|
||||
@@ -478,10 +478,8 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)
|
||||
pm_runtime_enable(priv->dev);
|
||||
|
||||
ret = i2c_add_adapter(&priv->adap);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to add bus to i2c core\n");
|
||||
if (ret < 0)
|
||||
goto err_runtime;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -1613,7 +1613,6 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
"SMBus I801 adapter at %04lx", priv->smba);
|
||||
err = i2c_add_adapter(&priv->adapter);
|
||||
if (err) {
|
||||
dev_err(&dev->dev, "Failed to add SMBus adapter\n");
|
||||
i801_acpi_remove(priv);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -751,10 +751,8 @@ static int iic_probe(struct platform_device *ofdev)
|
||||
adap->timeout = HZ;
|
||||
|
||||
ret = i2c_add_adapter(adap);
|
||||
if (ret < 0) {
|
||||
dev_err(&ofdev->dev, "failed to register i2c adapter\n");
|
||||
if (ret < 0)
|
||||
goto error_cleanup;
|
||||
}
|
||||
|
||||
dev_info(&ofdev->dev, "using %s mode\n",
|
||||
dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
|
||||
|
||||
@@ -1394,10 +1394,8 @@ static int img_i2c_probe(struct platform_device *pdev)
|
||||
goto disable_clk;
|
||||
|
||||
ret = i2c_add_numbered_adapter(&i2c->adap);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to add adapter\n");
|
||||
if (ret < 0)
|
||||
goto disable_clk;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -1129,10 +1129,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
|
||||
|
||||
/* Add I2C adapter */
|
||||
ret = i2c_add_numbered_adapter(&i2c_imx->adapter);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "registration failed\n");
|
||||
if (ret < 0)
|
||||
goto rpm_disable;
|
||||
}
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user