summaryrefslogtreecommitdiff
path: root/drivers/peci/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/peci/core.c')
-rw-r--r--drivers/peci/core.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/peci/core.c b/drivers/peci/core.c
index 0f83a9c6093b..936c1fadefe5 100644
--- a/drivers/peci/core.c
+++ b/drivers/peci/core.c
@@ -25,7 +25,7 @@ static void peci_controller_dev_release(struct device *dev)
kfree(controller);
}
-struct device_type peci_controller_type = {
+const struct device_type peci_controller_type = {
.release = peci_controller_dev_release,
};
@@ -158,14 +158,13 @@ err_put:
return ERR_PTR(ret);
}
-EXPORT_SYMBOL_NS_GPL(devm_peci_controller_add, PECI);
+EXPORT_SYMBOL_NS_GPL(devm_peci_controller_add, "PECI");
static const struct peci_device_id *
peci_bus_match_device_id(const struct peci_device_id *id, struct peci_device *device)
{
- while (id->family != 0) {
- if (id->family == device->info.family &&
- id->model == device->info.model)
+ while (id->x86_vfm != 0) {
+ if (id->x86_vfm == device->info.x86_vfm)
return id;
id++;
}
@@ -173,10 +172,10 @@ peci_bus_match_device_id(const struct peci_device_id *id, struct peci_device *de
return NULL;
}
-static int peci_bus_device_match(struct device *dev, struct device_driver *drv)
+static int peci_bus_device_match(struct device *dev, const struct device_driver *drv)
{
struct peci_device *device = to_peci_device(dev);
- struct peci_driver *peci_drv = to_peci_driver(drv);
+ const struct peci_driver *peci_drv = to_peci_driver(drv);
if (dev->type != &peci_device_type)
return 0;
@@ -201,7 +200,7 @@ static void peci_bus_device_remove(struct device *dev)
driver->remove(device);
}
-struct bus_type peci_bus_type = {
+const struct bus_type peci_bus_type = {
.name = "peci",
.match = peci_bus_device_match,
.probe = peci_bus_device_probe,