Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/imx/dcss: request memory region

The driver's memory regions are currently just ioremap()ed, but not
reserved through a request. That's not a bug, but having the request is
a little more robust.

Implement the region-request through the corresponding managed
devres-function.

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240124111904.18261-3-pstanner@redhat.com

authored by

Philipp Stanner and committed by
Laurentiu Palcu
90393c9b 041261ac

+7
+7
drivers/gpu/drm/imx/dcss/dcss-dev.c
··· 170 170 struct resource *res; 171 171 struct dcss_dev *dcss; 172 172 const struct dcss_type_data *devtype; 173 + resource_size_t res_len; 173 174 174 175 devtype = of_device_get_match_data(dev); 175 176 if (!devtype) { ··· 182 181 if (!res) { 183 182 dev_err(dev, "cannot get memory resource\n"); 184 183 return ERR_PTR(-EINVAL); 184 + } 185 + 186 + res_len = res->end - res->start; 187 + if (!devm_request_mem_region(dev, res->start, res_len, "dcss")) { 188 + dev_err(dev, "cannot request memory region\n"); 189 + return ERR_PTR(-EBUSY); 185 190 } 186 191 187 192 dcss = kzalloc(sizeof(*dcss), GFP_KERNEL);