mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Revert "i2c: create debugfs entry per adapter"
This reverts commit e2a268b0f5 which is
commit 73febd775bdbdb98c81255ff85773ac410ded5c4 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I4561926ae6f69310f5217894c6936c1dbfff8c00
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/clk/clk-conf.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/errno.h>
|
||||
@@ -67,8 +66,6 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver);
|
||||
static DEFINE_STATIC_KEY_FALSE(i2c_trace_msg_key);
|
||||
static bool is_registered;
|
||||
|
||||
static struct dentry *i2c_debugfs_root;
|
||||
|
||||
int i2c_transfer_trace_reg(void)
|
||||
{
|
||||
static_branch_inc(&i2c_trace_msg_key);
|
||||
@@ -1502,8 +1499,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
|
||||
goto out_list;
|
||||
}
|
||||
|
||||
adap->debugfs = debugfs_create_dir(dev_name(&adap->dev), i2c_debugfs_root);
|
||||
|
||||
res = i2c_setup_smbus_alert(adap);
|
||||
if (res)
|
||||
goto out_reg;
|
||||
@@ -1543,7 +1538,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap)
|
||||
return 0;
|
||||
|
||||
out_reg:
|
||||
debugfs_remove_recursive(adap->debugfs);
|
||||
init_completion(&adap->dev_released);
|
||||
device_unregister(&adap->dev);
|
||||
wait_for_completion(&adap->dev_released);
|
||||
@@ -1745,8 +1739,6 @@ void i2c_del_adapter(struct i2c_adapter *adap)
|
||||
|
||||
i2c_host_notify_irq_teardown(adap);
|
||||
|
||||
debugfs_remove_recursive(adap->debugfs);
|
||||
|
||||
/* wait until all references to the device are gone
|
||||
*
|
||||
* FIXME: This is old code and should ideally be replaced by an
|
||||
@@ -1975,8 +1967,6 @@ static int __init i2c_init(void)
|
||||
|
||||
is_registered = true;
|
||||
|
||||
i2c_debugfs_root = debugfs_create_dir("i2c", NULL);
|
||||
|
||||
#ifdef CONFIG_I2C_COMPAT
|
||||
i2c_adapter_compat_class = class_compat_register("i2c-adapter");
|
||||
if (!i2c_adapter_compat_class) {
|
||||
@@ -2015,7 +2005,6 @@ static void __exit i2c_exit(void)
|
||||
#ifdef CONFIG_I2C_COMPAT
|
||||
class_compat_unregister(i2c_adapter_compat_class);
|
||||
#endif
|
||||
debugfs_remove_recursive(i2c_debugfs_root);
|
||||
bus_unregister(&i2c_bus_type);
|
||||
tracepoint_synchronize_unregister();
|
||||
}
|
||||
|
||||
@@ -750,8 +750,6 @@ struct i2c_adapter {
|
||||
|
||||
struct irq_domain *host_notify_domain;
|
||||
struct regulator *bus_regulator;
|
||||
|
||||
struct dentry *debugfs;
|
||||
};
|
||||
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user