Skip to contentSkip to conversation

misc: add driver support for MAX8997 MUIC

PATCH MyungJoo Ham 1 participant 1 message Nov 29, 2011

lore
Share & tools
lore
#0 lore raw

Sender : Andrew Morton<[email protected]>
Date : 2011-11-29 08:48 (GMT+09:00)
Title : Re: [PATCH 2/2] misc: add driver support for MAX8997 MUIC

Quoted 6 lines
Quoted 3 lines · On Thu, 24 Nov 2011 18:12:18 +0900 Donggeun Kim wrote:

...

Quoted 16 lines

Review

Quoted 11 lines
(quoted diff) +11 -0
+static irqreturn_t max8997_muic_irq_handler(int irq, void *data)
+{
+ struct max8997_muic_info *info = data;
+
+ dev_dbg(info->dev, "irq:%d ", irq);
+ info->irq = irq;
+
+ schedule_work(&info->irq_work);
+
+ return IRQ_HANDLED;
+}

The code does schedule_work() but I see no flush_work(). Is it possible for the work to still be pending after device shutdown, or even after rmmod?

Yes, it is possible that the work is still pending or running and use data that are freed by max8997_muic_remove().

To be safe with the last-minute interrupt handling, we may need to add flush_work or cancel_work_sync at max8997_muic_remove().

Quoted 1 line

MyungJoo Ham (함명주)

Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: +82-10-6714-2858 / office: +82-31-279-8033 �淸�{.n�+돴윯돪�+%듚�깁負쪐w��{.n�+돴쪐{깸G쳺��{ay����,j�f"톒쉹��묎�z_溫(�쉸듶줷"얎�m����G쳺�◀?솳鈺�&x�~뤳턨O뺞촾퇉v�^�m��� �띠�◀?뻀�