@@ -214,6 +214,12 @@ static ssize_t vidi_store_connection(struct device *dev,
214
214
static DEVICE_ATTR (connection , 0644 , vidi_show_connection ,
215
215
vidi_store_connection ) ;
216
216
217
+ static struct attribute * vidi_attrs [] = {
218
+ & dev_attr_connection .attr ,
219
+ NULL ,
220
+ };
221
+ ATTRIBUTE_GROUPS (vidi );
222
+
217
223
int vidi_connection_ioctl (struct drm_device * drm_dev , void * data ,
218
224
struct drm_file * file_priv )
219
225
{
@@ -439,7 +445,6 @@ static int vidi_probe(struct platform_device *pdev)
439
445
{
440
446
struct vidi_context * ctx ;
441
447
struct device * dev = & pdev -> dev ;
442
- int ret ;
443
448
444
449
ctx = devm_kzalloc (dev , sizeof (* ctx ), GFP_KERNEL );
445
450
if (!ctx )
@@ -453,23 +458,7 @@ static int vidi_probe(struct platform_device *pdev)
453
458
454
459
platform_set_drvdata (pdev , ctx );
455
460
456
- ret = device_create_file (dev , & dev_attr_connection );
457
- if (ret < 0 ) {
458
- DRM_DEV_ERROR (dev ,
459
- "failed to create connection sysfs.\n" );
460
- return ret ;
461
- }
462
-
463
- ret = component_add (dev , & vidi_component_ops );
464
- if (ret )
465
- goto err_remove_file ;
466
-
467
- return ret ;
468
-
469
- err_remove_file :
470
- device_remove_file (dev , & dev_attr_connection );
471
-
472
- return ret ;
461
+ return component_add (dev , & vidi_component_ops );
473
462
}
474
463
475
464
static int vidi_remove (struct platform_device * pdev )
@@ -494,5 +483,6 @@ struct platform_driver vidi_driver = {
494
483
.driver = {
495
484
.name = "exynos-drm-vidi" ,
496
485
.owner = THIS_MODULE ,
486
+ .dev_groups = vidi_groups ,
497
487
},
498
488
};
0 commit comments