From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754563AbcDATiv (ORCPT ); Fri, 1 Apr 2016 15:38:51 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37454 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751210AbcDATiu (ORCPT ); Fri, 1 Apr 2016 15:38:50 -0400 From: Daniel Lezcano To: p.zabel@pengutronix.de Cc: matthias.bgg@gmail.com, linux-kernel@vger.kernel.org (open list) Subject: [PATCH] reset: Add missing function stub for device_reset Date: Fri, 1 Apr 2016 21:38:16 +0200 Message-Id: <1459539496-823-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Mediatek's thermal driver fails to compile when the RESET_CONTROLLER option is not set. Logically, as the driver depends on this option to compile, the Kconfig should select it but actually that is not correct because the Kconfig provides also the COMPILE_TEST to increase the compile test coverage. By providing the missing 'device_reset' stub for the driver in reset.h, that let the kernel to compile on different platforms with the Mediatek thermal driver enabled with the COMPILE_TEST option. Signed-off-by: Daniel Lezcano --- include/linux/reset.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/reset.h b/include/linux/reset.h index c4c097d..db8cd7b 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -72,6 +72,11 @@ static inline void reset_control_put(struct reset_control *rstc) WARN_ON(1); } +static inline int __must_check device_reset(struct device *dev) +{ + return -ENOTSUPP; +} + static inline int device_reset_optional(struct device *dev) { return -ENOTSUPP; -- 1.9.1