mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
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: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
e641abd3c7
commit
2a556ce779
@ -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 @@ out_remove_attr:
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user