Commit 0c602c7f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

mfd: intel_soc_pmic_crc: Convert driver to use ->probe_new()

Use the ->probe_new() callback.

The driver does not use const struct i2c_device_id * argument,
so convert it to utilise the simplified I²C driver registration.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-8-andriy.shevchenko@linux.intel.com
parent 09c4e702
...@@ -164,8 +164,7 @@ static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = { ...@@ -164,8 +164,7 @@ static const struct intel_soc_pmic_config intel_soc_pmic_config_cht_crc = {
.irq_chip = &crystal_cove_irq_chip, .irq_chip = &crystal_cove_irq_chip,
}; };
static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c, static int intel_soc_pmic_i2c_probe(struct i2c_client *i2c)
const struct i2c_device_id *i2c_id)
{ {
const struct intel_soc_pmic_config *config; const struct intel_soc_pmic_config *config;
struct device *dev = &i2c->dev; struct device *dev = &i2c->dev;
...@@ -254,11 +253,6 @@ static int intel_soc_pmic_resume(struct device *dev) ...@@ -254,11 +253,6 @@ static int intel_soc_pmic_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, intel_soc_pmic_suspend, intel_soc_pmic_resume); static DEFINE_SIMPLE_DEV_PM_OPS(crystal_cove_pm_ops, intel_soc_pmic_suspend, intel_soc_pmic_resume);
static const struct i2c_device_id intel_soc_pmic_i2c_id[] = {
{ }
};
MODULE_DEVICE_TABLE(i2c, intel_soc_pmic_i2c_id);
static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { static const struct acpi_device_id intel_soc_pmic_acpi_match[] = {
{ "INT33FD" }, { "INT33FD" },
{ }, { },
...@@ -271,9 +265,8 @@ static struct i2c_driver intel_soc_pmic_i2c_driver = { ...@@ -271,9 +265,8 @@ static struct i2c_driver intel_soc_pmic_i2c_driver = {
.pm = pm_sleep_ptr(&crystal_cove_pm_ops), .pm = pm_sleep_ptr(&crystal_cove_pm_ops),
.acpi_match_table = intel_soc_pmic_acpi_match, .acpi_match_table = intel_soc_pmic_acpi_match,
}, },
.probe = intel_soc_pmic_i2c_probe, .probe_new = intel_soc_pmic_i2c_probe,
.remove = intel_soc_pmic_i2c_remove, .remove = intel_soc_pmic_i2c_remove,
.id_table = intel_soc_pmic_i2c_id,
.shutdown = intel_soc_pmic_shutdown, .shutdown = intel_soc_pmic_shutdown,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment