From: Wolfram Sang Date: Tue, 18 Mar 2025 09:12:12 +0000 (+0100) Subject: mfd: tps65010: Use per-client debugfs directory X-Git-Tag: v6.16-rc1~63^2~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70a9d374293b42055626d59c2eeeff4d624806bf;p=thirdparty%2Fkernel%2Fstable.git mfd: tps65010: Use per-client debugfs directory The I2C core now provides a debugfs entry for each client. Let this driver use it instead of the root directory. Further improvements by this change: automatic support of multiple instances. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20250318091234.22170-1-wsa+renesas@sang-engineering.com Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index 00fb12c4f491f..e7c57431c0cc3 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c @@ -512,7 +512,6 @@ static void tps65010_remove(struct i2c_client *client) if (client->irq > 0) free_irq(client->irq, tps); cancel_delayed_work_sync(&tps->work); - debugfs_remove(tps->file); the_tps = NULL; } @@ -608,7 +607,7 @@ static int tps65010_probe(struct i2c_client *client) tps65010_work(&tps->work.work); - tps->file = debugfs_create_file(DRIVER_NAME, S_IRUGO, NULL, + tps->file = debugfs_create_file(DRIVER_NAME, S_IRUGO, client->debugfs, tps, DEBUG_FOPS); /* optionally register GPIOs */