summaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/wilco_ec
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/chrome/wilco_ec')
-rw-r--r--drivers/platform/chrome/wilco_ec/core.c5
-rw-r--r--drivers/platform/chrome/wilco_ec/debugfs.c6
-rw-r--r--drivers/platform/chrome/wilco_ec/event.c2
-rw-r--r--drivers/platform/chrome/wilco_ec/telemetry.c6
4 files changed, 7 insertions, 12 deletions
diff --git a/drivers/platform/chrome/wilco_ec/core.c b/drivers/platform/chrome/wilco_ec/core.c
index d6a994bdc1..9b59a1bed2 100644
--- a/drivers/platform/chrome/wilco_ec/core.c
+++ b/drivers/platform/chrome/wilco_ec/core.c
@@ -132,7 +132,7 @@ unregister_debugfs:
return ret;
}
-static int wilco_ec_remove(struct platform_device *pdev)
+static void wilco_ec_remove(struct platform_device *pdev)
{
struct wilco_ec_device *ec = platform_get_drvdata(pdev);
@@ -142,7 +142,6 @@ static int wilco_ec_remove(struct platform_device *pdev)
platform_device_unregister(ec->rtc_pdev);
if (ec->debugfs_pdev)
platform_device_unregister(ec->debugfs_pdev);
- return 0;
}
static const struct acpi_device_id wilco_ec_acpi_device_ids[] = {
@@ -157,7 +156,7 @@ static struct platform_driver wilco_ec_driver = {
.acpi_match_table = wilco_ec_acpi_device_ids,
},
.probe = wilco_ec_probe,
- .remove = wilco_ec_remove,
+ .remove_new = wilco_ec_remove,
};
module_platform_driver(wilco_ec_driver);
diff --git a/drivers/platform/chrome/wilco_ec/debugfs.c b/drivers/platform/chrome/wilco_ec/debugfs.c
index 7a13f13b16..93c11f81ca 100644
--- a/drivers/platform/chrome/wilco_ec/debugfs.c
+++ b/drivers/platform/chrome/wilco_ec/debugfs.c
@@ -260,11 +260,9 @@ static int wilco_ec_debugfs_probe(struct platform_device *pdev)
return 0;
}
-static int wilco_ec_debugfs_remove(struct platform_device *pdev)
+static void wilco_ec_debugfs_remove(struct platform_device *pdev)
{
debugfs_remove_recursive(debug_info->dir);
-
- return 0;
}
static struct platform_driver wilco_ec_debugfs_driver = {
@@ -272,7 +270,7 @@ static struct platform_driver wilco_ec_debugfs_driver = {
.name = DRV_NAME,
},
.probe = wilco_ec_debugfs_probe,
- .remove = wilco_ec_debugfs_remove,
+ .remove_new = wilco_ec_debugfs_remove,
};
module_platform_driver(wilco_ec_debugfs_driver);
diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/chrome/wilco_ec/event.c
index a40f60bcef..f80a7c83cf 100644
--- a/drivers/platform/chrome/wilco_ec/event.c
+++ b/drivers/platform/chrome/wilco_ec/event.c
@@ -95,7 +95,7 @@ struct ec_event_queue {
int capacity;
int head;
int tail;
- struct ec_event *entries[];
+ struct ec_event *entries[] __counted_by(capacity);
};
/* Maximum number of events to store in ec_event_queue */
diff --git a/drivers/platform/chrome/wilco_ec/telemetry.c b/drivers/platform/chrome/wilco_ec/telemetry.c
index 54708aa6c7..253098bace 100644
--- a/drivers/platform/chrome/wilco_ec/telemetry.c
+++ b/drivers/platform/chrome/wilco_ec/telemetry.c
@@ -400,20 +400,18 @@ static int telem_device_probe(struct platform_device *pdev)
return 0;
}
-static int telem_device_remove(struct platform_device *pdev)
+static void telem_device_remove(struct platform_device *pdev)
{
struct telem_device_data *dev_data = platform_get_drvdata(pdev);
cdev_device_del(&dev_data->cdev, &dev_data->dev);
ida_simple_remove(&telem_ida, MINOR(dev_data->dev.devt));
put_device(&dev_data->dev);
-
- return 0;
}
static struct platform_driver telem_driver = {
.probe = telem_device_probe,
- .remove = telem_device_remove,
+ .remove_new = telem_device_remove,
.driver = {
.name = DRV_NAME,
},