@@ -3069,9 +3069,7 @@ static struct attribute *mxt_attrs[] = {
3069
3069
NULL
3070
3070
};
3071
3071
3072
- static const struct attribute_group mxt_attr_group = {
3073
- .attrs = mxt_attrs ,
3074
- };
3072
+ ATTRIBUTE_GROUPS (mxt );
3075
3073
3076
3074
static void mxt_start (struct mxt_data * data )
3077
3075
{
@@ -3348,18 +3346,8 @@ static int mxt_probe(struct i2c_client *client)
3348
3346
if (error )
3349
3347
goto err_disable_regulators ;
3350
3348
3351
- error = sysfs_create_group (& client -> dev .kobj , & mxt_attr_group );
3352
- if (error ) {
3353
- dev_err (& client -> dev , "Failure %d creating sysfs group\n" ,
3354
- error );
3355
- goto err_free_object ;
3356
- }
3357
-
3358
3349
return 0 ;
3359
3350
3360
- err_free_object :
3361
- mxt_free_input_device (data );
3362
- mxt_free_object_table (data );
3363
3351
err_disable_regulators :
3364
3352
regulator_bulk_disable (ARRAY_SIZE (data -> regulators ),
3365
3353
data -> regulators );
@@ -3371,7 +3359,6 @@ static void mxt_remove(struct i2c_client *client)
3371
3359
struct mxt_data * data = i2c_get_clientdata (client );
3372
3360
3373
3361
disable_irq (data -> irq );
3374
- sysfs_remove_group (& client -> dev .kobj , & mxt_attr_group );
3375
3362
mxt_free_input_device (data );
3376
3363
mxt_free_object_table (data );
3377
3364
regulator_bulk_disable (ARRAY_SIZE (data -> regulators ),
@@ -3455,6 +3442,7 @@ MODULE_DEVICE_TABLE(i2c, mxt_id);
3455
3442
static struct i2c_driver mxt_driver = {
3456
3443
.driver = {
3457
3444
.name = "atmel_mxt_ts" ,
3445
+ .dev_groups = mxt_groups ,
3458
3446
.of_match_table = mxt_of_match ,
3459
3447
.acpi_match_table = ACPI_PTR (mxt_acpi_id ),
3460
3448
.pm = pm_sleep_ptr (& mxt_pm_ops ),
0 commit comments