diff options
Diffstat (limited to 'drivers/cxl')
-rw-r--r-- | drivers/cxl/core/memdev.c | 2 | ||||
-rw-r--r-- | drivers/cxl/core/port.c | 8 | ||||
-rw-r--r-- | drivers/cxl/cxl.h | 4 | ||||
-rw-r--r-- | drivers/cxl/cxlmem.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index a38a0cc20d47..b75dd77df7ce 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -162,7 +162,7 @@ static const struct device_type cxl_memdev_type = { .groups = cxl_memdev_attribute_groups, }; -bool is_cxl_memdev(struct device *dev) +bool is_cxl_memdev(const struct device *dev) { return dev->type == &cxl_memdev_type; } diff --git a/drivers/cxl/core/port.c b/drivers/cxl/core/port.c index b631a0520456..3f02dc135a12 100644 --- a/drivers/cxl/core/port.c +++ b/drivers/cxl/core/port.c @@ -38,7 +38,7 @@ static ssize_t devtype_show(struct device *dev, struct device_attribute *attr, } static DEVICE_ATTR_RO(devtype); -static int cxl_device_id(struct device *dev) +static int cxl_device_id(const struct device *dev) { if (dev->type == &cxl_nvdimm_bridge_type) return CXL_DEVICE_NVDIMM_BRIDGE; @@ -523,13 +523,13 @@ static const struct device_type cxl_port_type = { .groups = cxl_port_attribute_groups, }; -bool is_cxl_port(struct device *dev) +bool is_cxl_port(const struct device *dev) { return dev->type == &cxl_port_type; } EXPORT_SYMBOL_NS_GPL(is_cxl_port, CXL); -struct cxl_port *to_cxl_port(struct device *dev) +struct cxl_port *to_cxl_port(const struct device *dev) { if (dev_WARN_ONCE(dev, dev->type != &cxl_port_type, "not a cxl_port device\n")) @@ -1826,7 +1826,7 @@ void cxl_driver_unregister(struct cxl_driver *cxl_drv) } EXPORT_SYMBOL_NS_GPL(cxl_driver_unregister, CXL); -static int cxl_bus_uevent(struct device *dev, struct kobj_uevent_env *env) +static int cxl_bus_uevent(const struct device *dev, struct kobj_uevent_env *env) { return add_uevent_var(env, "MODALIAS=" CXL_MODALIAS_FMT, cxl_device_id(dev)); diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index 1b1cf459ac77..c9e1b48a1a53 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -588,8 +588,8 @@ static inline bool is_cxl_root(struct cxl_port *port) return port->uport == port->dev.parent; } -bool is_cxl_port(struct device *dev); -struct cxl_port *to_cxl_port(struct device *dev); +bool is_cxl_port(const struct device *dev); +struct cxl_port *to_cxl_port(const struct device *dev); struct pci_bus; int devm_cxl_register_pci_bus(struct device *host, struct device *uport, struct pci_bus *bus); diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h index ab138004f644..6749f2afb1b7 100644 --- a/drivers/cxl/cxlmem.h +++ b/drivers/cxl/cxlmem.h @@ -72,7 +72,7 @@ cxled_to_memdev(struct cxl_endpoint_decoder *cxled) return to_cxl_memdev(port->uport); } -bool is_cxl_memdev(struct device *dev); +bool is_cxl_memdev(const struct device *dev); static inline bool is_cxl_endpoint(struct cxl_port *port) { return is_cxl_memdev(port->uport); |