Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbbGWMeI (ORCPT ); Thu, 23 Jul 2015 08:34:08 -0400 Received: from m50-112.126.com ([123.125.50.112]:33937 "EHLO m50-112.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbbGWMdz (ORCPT ); Thu, 23 Jul 2015 08:33:55 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: Daniel Lezcano , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Xunlei Pang Subject: [PATCH] cpuidle/coupled: Init cpuidle_device::safe_state_index Date: Thu, 23 Jul 2015 20:31:21 +0800 Message-Id: <1437654681-20893-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: j9KowAC33WIg37BVoKW9AA--.262S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gw13JrWUZw1kCF4xAr4xJFb_yoW3Gwb_Wr y0qr97Jw1jqw4SgrZIvrn8Zr10yw13WrWv934vvas8A3yUZ3yDurykZ34UWa1UCr47Arn0 9wnrJ3yjvr18CjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU0eWlDUUUUU== X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbi6AdAv1UJRZGT0AAAsb Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 960 Lines: 32 From: Xunlei Pang cpuidle_device::safe_state_index need to be initialized before use, so assign the driver's safe_state_index to it. Signed-off-by: Xunlei Pang --- drivers/cpuidle/cpuidle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index e8e2775..ed5c8efe 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -585,6 +585,8 @@ int cpuidle_register(struct cpuidle_driver *drv, */ if (coupled_cpus) device->coupled_cpus = *coupled_cpus; + + device->safe_state_index = drv->safe_state_index; #endif ret = cpuidle_register_device(device); if (!ret) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/