/* frees smsclient object and all subclients associated with it */
void smscore_unregister_client(struct smscore_client_t *client)
/* frees smsclient object and all subclients associated with it */
void smscore_unregister_client(struct smscore_client_t *client)
{
	struct smscore_device_t *coredev = client->coredev;
	unsigned long flags;
	spin_lock_irqsave(&coredev->clientslock, flags);
	while (!list_empty(&client->idlist)) {
		struct smscore_idlist_t *identry =
			(struct smscore_idlist_t *) client->idlist.next;
		list_del(&identry->entry);
		kfree(identry);
	}
	sms_info("%p", client->context);
	list_del(&client->entry);
	kfree(client);
	spin_unlock_irqrestore(&coredev->clientslock, flags);
}