Skip to content

Commit c53a17d

Browse files
committed
Revert "drm/vkms: convert to use faux_device"
JIRA: https://issues.redhat.com/browse/RHEL-113577 Upstream Status: RHEL only This reverts commit 5686601. This commit was backported automatically as part of the DRM backport. The faux bus is not available in this tree. Revert the change moving the VKMS driver to this new bus. NOTE: This commit does not compile due to missing RHEL-specific fix-ups, which are split out into separate Git commits following this one. If git bisect selected this commit, run "git bisect skip" and try again. Repeat this until it selects a commit which compiles. Signed-off-by: José Expósito <jexposit@redhat.com>
1 parent f551b69 commit c53a17d

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

drivers/gpu/drm/vkms/vkms_drv.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
#include <linux/module.h>
13-
#include <linux/device/faux.h>
13+
#include <linux/platform_device.h>
1414
#include <linux/dma-mapping.h>
1515

1616
#include <drm/clients/drm_client_setup.h>
@@ -149,27 +149,27 @@ static int vkms_modeset_init(struct vkms_device *vkmsdev)
149149
static int vkms_create(struct vkms_config *config)
150150
{
151151
int ret;
152-
struct faux_device *fdev;
152+
struct platform_device *pdev;
153153
struct vkms_device *vkms_device;
154154
const char *dev_name;
155155

156156
dev_name = vkms_config_get_device_name(config);
157-
fdev = faux_device_create(dev_name, NULL, NULL);
158-
if (!fdev)
159-
return -ENODEV;
157+
pdev = platform_device_register_simple(dev_name, -1, NULL, 0);
158+
if (IS_ERR(pdev))
159+
return PTR_ERR(pdev);
160160

161-
if (!devres_open_group(&fdev->dev, NULL, GFP_KERNEL)) {
161+
if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
162162
ret = -ENOMEM;
163163
goto out_unregister;
164164
}
165165

166-
vkms_device = devm_drm_dev_alloc(&fdev->dev, &vkms_driver,
166+
vkms_device = devm_drm_dev_alloc(&pdev->dev, &vkms_driver,
167167
struct vkms_device, drm);
168168
if (IS_ERR(vkms_device)) {
169169
ret = PTR_ERR(vkms_device);
170170
goto out_devres;
171171
}
172-
vkms_device->faux_dev = fdev;
172+
vkms_device->platform = pdev;
173173
vkms_device->config = config;
174174
config->dev = vkms_device;
175175

@@ -203,9 +203,9 @@ static int vkms_create(struct vkms_config *config)
203203
return 0;
204204

205205
out_devres:
206-
devres_release_group(&fdev->dev, NULL);
206+
devres_release_group(&pdev->dev, NULL);
207207
out_unregister:
208-
faux_device_destroy(fdev);
208+
platform_device_unregister(pdev);
209209
return ret;
210210
}
211211

@@ -231,19 +231,19 @@ static int __init vkms_init(void)
231231

232232
static void vkms_destroy(struct vkms_config *config)
233233
{
234-
struct faux_device *fdev;
234+
struct platform_device *pdev;
235235

236236
if (!config->dev) {
237237
DRM_INFO("vkms_device is NULL.\n");
238238
return;
239239
}
240240

241-
fdev = config->dev->faux_dev;
241+
pdev = config->dev->platform;
242242

243243
drm_dev_unregister(&config->dev->drm);
244244
drm_atomic_helper_shutdown(&config->dev->drm);
245-
devres_release_group(&fdev->dev, NULL);
246-
faux_device_destroy(fdev);
245+
devres_release_group(&pdev->dev, NULL);
246+
platform_device_unregister(pdev);
247247

248248
config->dev = NULL;
249249
}

drivers/gpu/drm/vkms/vkms_drv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ struct vkms_config;
232232
* struct vkms_device - Description of a VKMS device
233233
*
234234
* @drm - Base device in DRM
235-
* @faux_dev - Associated faux device
235+
* @platform - Associated platform device
236236
* @output - Configuration and sub-components of the VKMS device
237237
* @config: Configuration used in this VKMS device
238238
*/
239239
struct vkms_device {
240240
struct drm_device drm;
241-
struct faux_device *faux_dev;
241+
struct platform_device *platform;
242242
const struct vkms_config *config;
243243
};
244244

0 commit comments

Comments
 (0)