diff --git a/drivers/misc/max8997-muic.c b/drivers/misc/max8997-muic.c
index 74a9448..d74ef41 100644
--- a/drivers/misc/max8997-muic.c
+++ b/drivers/misc/max8997-muic.c
@@ -307,11 +307,8 @@
 			struct max8997_muic_info, irq_work);
 	struct max8997_platform_data *pdata =
 				dev_get_platdata(info->iodev->dev);
-	char env_name_str[30], env_state_str[15];
-	char *envp[] = { env_name_str, env_state_str, NULL };
 	u8 status[3];
-	u8 adc, adc_low, adc_err;
-	u8 vb_volt, db_chg, dcd_tmr, cdr, chg_type, ovp;
+	u8 adc, chg_type;
 
 	int irq_type = info->irq - pdata->irq_base;
 	int ret;
@@ -330,72 +327,24 @@
 			status[0], status[1]);
 
 	switch (irq_type) {
-	case MAX8997_MUICIRQ_ADCError:
-		adc_err = status[0] & STATUS1_ADCERR_MASK;
-		adc_err >>= STATUS1_ADCERR_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "ADC_Error");
-		sprintf(env_state_str, "STATE=%d", adc_err);
-		break;
-	case MAX8997_MUICIRQ_ADCLow:
-		adc_low = status[0] & STATUS1_ADCLOW_MASK;
-		adc_low >>= STATUS1_ADCLOW_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "ADC_Low");
-		sprintf(env_state_str, "STATE=%d", adc_low);
-		break;
 	case MAX8997_MUICIRQ_ADC:
 		adc = status[0] & STATUS1_ADC_MASK;
 		adc >>= STATUS1_ADC_SHIFT;
 
 		max8997_muic_handle_adc(info, adc);
-
-		sprintf(env_name_str, "IRQ=%s", "ADC");
-		sprintf(env_state_str, "STATE=%d", adc);
-		break;
-	case MAX8997_MUICIRQ_VBVolt:
-		vb_volt = status[1] & STATUS2_VBVOLT_MASK;
-		vb_volt >>= STATUS2_VBVOLT_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "VB_Volt");
-		sprintf(env_state_str, "STATE=%d", vb_volt);
-		break;
-	case MAX8997_MUICIRQ_DBChg:
-		db_chg = status[1] & STATUS2_DBCHG_MASK;
-		db_chg >>= STATUS2_DBCHG_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "DB_CHARGER");
-		sprintf(env_state_str, "STATE=%d", db_chg);
-		break;
-	case MAX8997_MUICIRQ_DCDTmr:
-		dcd_tmr = status[1] & STATUS2_DCDTMR_MASK;
-		dcd_tmr >>= STATUS2_DCDTMR_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "DCD_TIMER");
-		sprintf(env_state_str, "STATE=%d", dcd_tmr);
-		break;
-	case MAX8997_MUICIRQ_ChgDetRun:
-		cdr = status[1] & STATUS2_CHGDETRUN_MASK;
-		cdr >>= STATUS2_CHGDETRUN_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "CHG_DET_RUN");
-		sprintf(env_state_str, "STATE=%d", cdr);
 		break;
 	case MAX8997_MUICIRQ_ChgTyp:
 		chg_type = status[1] & STATUS2_CHGTYP_MASK;
 		chg_type >>= STATUS2_CHGTYP_SHIFT;
 
 		max8997_muic_handle_charger_type(info, chg_type);
-
-		sprintf(env_name_str, "IRQ=%s", "CHARGER_TYPE");
-		sprintf(env_state_str, "STATE=%d", chg_type);
-		break;
-	case MAX8997_MUICIRQ_OVP:
-		ovp = status[2] & STATUS3_OVP_MASK;
-		ovp >>= STATUS3_OVP_SHIFT;
-		sprintf(env_name_str, "IRQ=%s", "OVER-VOLTAGE");
-		sprintf(env_state_str, "STATE=%d", ovp);
 		break;
 	default:
+		dev_info(info->dev, "misc interrupt: %s occurred\n",
+			 muic_irqs[irq_type].name);
 		break;
 	}
 
-	kobject_uevent_env(&info->dev->kobj, KOBJ_CHANGE, envp);
-
 	mutex_unlock(&info->mutex);
 
 	return;
@@ -438,74 +387,6 @@
 	max8997_muic_handle_charger_type(info, chg_type);
 }
 
-static ssize_t max8997_muic_show_manualsw(struct device *dev,
-		struct device_attribute *attr, char *buf)
-{
-	struct max8997_muic_info *info = dev_get_drvdata(dev);
-	int ret;
-	u8 value, manual_switch;
-
-	ret = max8997_read_reg(info->muic, MAX8997_MUIC_REG_CONTROL1, &value);
-	if (ret) {
-		dev_err(info->dev, "failed to read muic register\n");
-		return sprintf(buf, "UNKNOWN\n");
-	}
-
-	manual_switch = value & (COMN1SW_MASK | COMP2SW_MASK);
-
-	switch (manual_switch) {
-	case MAX8997_SW_USB:
-		return sprintf(buf, "USB\n");
-	case MAX8997_SW_AUDIO:
-		return sprintf(buf, "AUDIO\n");
-	case MAX8997_SW_UART:
-		return sprintf(buf, "UART\n");
-	default:
-		return sprintf(buf, "OPEN\n");
-	}
-}
-
-static ssize_t max8997_muic_store_manualsw(struct device *dev,
-				    struct device_attribute *attr,
-				    const char *buf, size_t count)
-{
-	struct max8997_muic_info *info = dev_get_drvdata(dev);
-	int ret;
-	u8 manual_switch;
-
-	if (!strncmp(buf, "USB", 3)) {
-		manual_switch = MAX8997_SW_USB;
-	} else if (!strncmp(buf, "AUDIO", 5)) {
-		manual_switch = MAX8997_SW_AUDIO;
-	} else if (!strncmp(buf, "UART", 4)) {
-		manual_switch = MAX8997_SW_UART;
-	} else if (!strncmp(buf, "OPEN", 4)) {
-		manual_switch = MAX8997_SW_OPEN;
-	} else {
-		dev_err(info->dev, "invalid parameter\n");
-		goto out;
-	}
-
-	ret = max8997_update_reg(info->muic, MAX8997_MUIC_REG_CONTROL1,
-			manual_switch, SW_MASK);
-	if (ret)
-		dev_err(info->dev, "failed to update muic register\n");
-out:
-	return count;
-}
-
-static DEVICE_ATTR(switch, S_IRUGO | S_IWUSR,
-		max8997_muic_show_manualsw, max8997_muic_store_manualsw);
-
-static struct attribute *max8997_muic_attributes[] = {
-	&dev_attr_switch.attr,
-	NULL
-};
-
-static const struct attribute_group max8997_muic_group = {
-	.attrs = max8997_muic_attributes,
-};
-
 static void max8997_initialize_device(struct max8997_muic_info *info)
 {
 	struct max8997_muic_platform_data *mdata = info->muic_pdata;
@@ -545,13 +426,6 @@
 	platform_set_drvdata(pdev, info);
 	mutex_init(&info->mutex);
 
-	ret = sysfs_create_group(&pdev->dev.kobj, &max8997_muic_group);
-	if (ret) {
-		dev_err(&pdev->dev,
-			"failed to create max8997 muic attribute group\n");
-		goto err_sysfs;
-	}
-
 	INIT_WORK(&info->irq_work, max8997_muic_irq_work);
 
 	for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
@@ -583,8 +457,6 @@
 	return ret;
 
 err_irq:
-	sysfs_remove_group(&pdev->dev.kobj, &max8997_muic_group);
-err_sysfs:
 err_pdata:
 	kfree(info);
 err_kfree:
@@ -598,10 +470,9 @@
 				dev_get_platdata(info->iodev->dev);
 	int i;
 
-	sysfs_remove_group(&pdev->dev.kobj, &max8997_muic_group);
-
 	for (i = 0; i < ARRAY_SIZE(muic_irqs); i++)
 		free_irq(pdata->irq_base + muic_irqs[i].irq, info);
+	cancel_work_sync(&info->irq_work);
 
 	kfree(info);
 
