/* dock_remove - free up resources related to the dock station  */
static int dock_remove(struct dock_station *ds)
/* dock_remove - free up resources related to the dock station  */
static int dock_remove(struct dock_station *ds)
{
	struct dock_dependent_device *dd, *tmp;
	struct platform_device *dock_device = ds->dock_device;
	if (!dock_station_count)
		return 0;
	list_for_each_entry_safe(dd, tmp, &ds->dependent_devices, list)
		kfree(dd);
	list_del(&ds->sibling);
	sysfs_remove_group(&dock_device->dev.kobj, &dock_attribute_group);
	platform_device_unregister(dock_device);
	return 0;
}