From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: linux-i2c@vger.kernel.org Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, "David S. Miller" <davem@davemloft.net>, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] igb: convert to use i2c_new_client_device() Date: Thu, 26 Mar 2020 22:09:59 +0100 [thread overview] Message-ID: <20200326211001.13171-2-wsa+renesas@sang-engineering.com> (raw) In-Reply-To: <20200326211001.13171-1-wsa+renesas@sang-engineering.com> Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- drivers/net/ethernet/intel/igb/igb_hwmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c index 3b83747b2700..21a29a0ca7f4 100644 --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c @@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter) } /* init i2c_client */ - client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info); - if (client == NULL) { + client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info); + if (IS_ERR(client)) { dev_info(&adapter->pdev->dev, "Failed to create new i2c device.\n"); - rc = -ENODEV; + rc = PTR_ERR(client); goto exit; } adapter->i2c_client = client; -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa+renesas@sang-engineering.com> To: intel-wired-lan@osuosl.org Subject: [Intel-wired-lan] [PATCH 1/2] igb: convert to use i2c_new_client_device() Date: Thu, 26 Mar 2020 22:09:59 +0100 [thread overview] Message-ID: <20200326211001.13171-2-wsa+renesas@sang-engineering.com> (raw) In-Reply-To: <20200326211001.13171-1-wsa+renesas@sang-engineering.com> Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> --- drivers/net/ethernet/intel/igb/igb_hwmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/intel/igb/igb_hwmon.c index 3b83747b2700..21a29a0ca7f4 100644 --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c @@ -198,11 +198,11 @@ int igb_sysfs_init(struct igb_adapter *adapter) } /* init i2c_client */ - client = i2c_new_device(&adapter->i2c_adap, &i350_sensor_info); - if (client == NULL) { + client = i2c_new_client_device(&adapter->i2c_adap, &i350_sensor_info); + if (IS_ERR(client)) { dev_info(&adapter->pdev->dev, "Failed to create new i2c device.\n"); - rc = -ENODEV; + rc = PTR_ERR(client); goto exit; } adapter->i2c_client = client; -- 2.20.1
next prev parent reply other threads:[~2020-03-26 21:12 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-26 21:09 [PATCH 0/2] net: convert to use new I2C API Wolfram Sang 2020-03-26 21:09 ` [Intel-wired-lan] " Wolfram Sang 2020-03-26 21:09 ` Wolfram Sang [this message] 2020-03-26 21:09 ` [Intel-wired-lan] [PATCH 1/2] igb: convert to use i2c_new_client_device() Wolfram Sang 2020-03-27 2:31 ` David Miller 2020-03-27 2:31 ` [Intel-wired-lan] " David Miller 2020-03-26 21:10 ` [PATCH 2/2] sfc: falcon: " Wolfram Sang 2020-03-27 2:31 ` David Miller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200326211001.13171-2-wsa+renesas@sang-engineering.com \ --to=wsa+renesas@sang-engineering.com \ --cc=davem@davemloft.net \ --cc=intel-wired-lan@lists.osuosl.org \ --cc=jeffrey.t.kirsher@intel.com \ --cc=linux-i2c@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.