Commit 2a556ce7 authored by Corey Minyard's avatar Corey Minyard

ipmi:ssif: Remove dynamic platform device handing

Platform devices can only come in through the DMI interface, and that
will get done before initialization is complete.  Therefore there is no
reason to hande getting a device in new_ssif_client after
initialization.

Dynamic entries can still come in through the i2c interfaces, but that's
handled differently.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent e641abd3
......@@ -189,8 +189,6 @@ struct ssif_addr_info {
struct device *dev;
struct i2c_client *client;
struct i2c_client *added_client;
struct mutex clients_mutex;
struct list_head clients;
......@@ -1941,21 +1939,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
goto out;
}
static int ssif_adapter_handler(struct device *adev, void *opaque)
{
struct ssif_addr_info *addr_info = opaque;
if (adev->type != &i2c_adapter_type)
return 0;
addr_info->added_client = i2c_new_client_device(to_i2c_adapter(adev),
&addr_info->binfo);
if (!addr_info->adapter_name)
return 1; /* Only try the first I2C adapter by default. */
return 0;
}
static int new_ssif_client(int addr, char *adapter_name,
int debug, int slave_addr,
enum ipmi_addr_src addr_src,
......@@ -1999,9 +1982,7 @@ static int new_ssif_client(int addr, char *adapter_name,
list_add_tail(&addr_info->link, &ssif_infos);
if (initialized)
i2c_for_each_dev(addr_info, ssif_adapter_handler);
/* Otherwise address list will get it */
/* Address list will get it */
out_unlock:
mutex_unlock(&ssif_infos_mutex);
......@@ -2121,8 +2102,6 @@ static int ssif_platform_remove(struct platform_device *dev)
return 0;
mutex_lock(&ssif_infos_mutex);
i2c_unregister_device(addr_info->added_client);
list_del(&addr_info->link);
kfree(addr_info);
mutex_unlock(&ssif_infos_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment