From patchwork Sat Jul 23 06:10:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Basavaraj Natikar X-Patchwork-Id: 12927092 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AB33C433EF for ; Sat, 23 Jul 2022 06:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233283AbiGWGLW (ORCPT ); Sat, 23 Jul 2022 02:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233023AbiGWGLV (ORCPT ); Sat, 23 Jul 2022 02:11:21 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2054.outbound.protection.outlook.com [40.107.212.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDEE53B961; Fri, 22 Jul 2022 23:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kxNr3kJ/mNc4JVjeuAnj3y1uoBUpqmSfzauP2kqyuGEuYXYwnH+vKpCiEn+ciAriImPHxAumwNqilrlALkugKb7yAcinXaeSzEnbJ/bT1xgc5hAZiP3wxlpevEtIrLc2gq6VZXtL9Zb6mTFvuUN1NDvd/gCaZWtO+Jaf8J5jrlSQ2BrrXYselq4S2q5FSs91GLIfajYF3mT6eg5lGL4hDhNAoefdmMhs9o0sfvBDdMHBZljdzFdl5V2sCcXdquTPLsbfCNxikyvra0xG+4VWbvV3Ov8lNJTOaGCcIEuA/RNtjgZc60HiEyzu9cPr77pX+06dbr9vGtB9jgk9inmxQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Xg0CWlX/OgTf0pmZVOziiWcjFWrIleA9qrvlinhckBc=; b=NAVggXICu4lOpY4OXOA9fw8av2WMilIFqmFWKf6JN4N5vT1l300LpVNYQnUW/rbR/7LfuttOtTrJSMo7sdlZT/+u2EJnCWS06mouLqJHs85vH/rDajVLBcg6pzsbTSCAvNjFqJjaFNQTTz3L9NBZiXS6MoMx/gAp1AgFenfJnkSFKDNOzNRedj1nDWSW5XgChJpL33m96I2j+emXIlgzHZ6jCdzJNZOkwzKstyGb2b8zSiRjgg6LZmREFXBQ/M12dwZBF2wlBI7cvFTwbfFi2wXNq91EC8OVTMbdU+nWBmMcL/J44z18pbIZXHveb1WZAi+q+48WKWD6WwKqIY+GQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Xg0CWlX/OgTf0pmZVOziiWcjFWrIleA9qrvlinhckBc=; b=kf+tG1DJYNzBsivpqX5Zn+cDmRzSzV2+NofgOySrzmcHX/0locQc2CMK9w0p4/cXiOc33XPmDHSefWYi44c+TdeEu1cAe2Z4XPYcBEOzvpot2hU+gy8u9sYSXMNmXl+TA16fXQq06XoRfYLWOCdhdInnlDtYp+Dbbo3N8hjvmIk= Received: from MW4PR03CA0103.namprd03.prod.outlook.com (2603:10b6:303:b7::18) by BY5PR12MB3748.namprd12.prod.outlook.com (2603:10b6:a03:1ad::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Sat, 23 Jul 2022 06:11:15 +0000 Received: from CO1NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b7:cafe::ca) by MW4PR03CA0103.outlook.office365.com (2603:10b6:303:b7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20 via Frontend Transport; Sat, 23 Jul 2022 06:11:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT006.mail.protection.outlook.com (10.13.174.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Sat, 23 Jul 2022 06:11:15 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sat, 23 Jul 2022 01:11:11 -0500 From: Basavaraj Natikar To: , , , , CC: , Basavaraj Natikar Subject: [PATCH for-next 1/2] HID: amd_sfh: Fix implicit declaration error on i386 Date: Sat, 23 Jul 2022 11:40:32 +0530 Message-ID: <20220723061033.1377061-2-Basavaraj.Natikar@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220723061033.1377061-1-Basavaraj.Natikar@amd.com> References: <20220723061033.1377061-1-Basavaraj.Natikar@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 667c789b-da58-48b0-6ce3-08da6c722677 X-MS-TrafficTypeDiagnostic: BY5PR12MB3748:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: smjK/qn1FWyAQxQapQIQkjZSR5GU/ap9mRn9c234VakAfuPocmS7+B5Xi5EZOy8tnEd5CvFswe/AeJQ266kcJGIn/COfbHugGX3GlIrqhZkH7t/erMEGWMf2TCHkS1L4PvHwyBjU7ZOVscdyUINzUHbV3IOHRCiMQAAs3CIm6CXEnmM7PBh1+aQghBAvGAKAryZWhZA6kRPMZyk4ri7vESESXaVr9JDAsOvf+EZnKDCy/UH716CVtJ00iedwR7ml7adKbjIA0YTv5KsIB6JLsudlpd2KeMqkEG5nz0FTN2p/o2un/bR6fNaBQtphNzuC7Tct+FVpfSGbsSGBXFVEzLqn1StDbTPN6N685vbkD4fi1IwYU5bY0eR1lGZg8RUNkiDT9cQhwgy2AguQbDPIl8hl90CGSbD8jrl2/2yY4SqD5eD9cetAHhALnqMv+8IuCuNBDfhEp0GAxRy1z0hw5qvTpr3Mha0oDOPXm/8PTeSSxwxAB9DwmC8YDuPriSoPyYlR255ytAiTjreR3hfH/IfTi4Av5CL+bjBqP1uLoOMRPON/vv19GpWZr5kuKYXjEAsVc2TBHOAibGcHssh6LmKEQBiYWY3nmBAo/QcPf7uzv7kq1+cL/23VW2lAkoRHm7eOvpbJnj4Kh2l5fkOk+p5j62F+u58Sy4tdz84mhNiB9SsMxpcky/xkSS+gytMDCWzeqJyyl/bArlLBC/SN0FpMVcXhCQLmrjfW5Ni3UsjW/M2UFCQWKMTmafKpU5tnx5H/0YG9SV1Fm0hOsRDhcb+/rr39kX+qS8Mxeql/7kRojC8fzz/eIn5V6GlJRA2qoc8SNeMMBshBgYNXFEZ2BA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(396003)(136003)(346002)(39860400002)(376002)(36840700001)(46966006)(40470700004)(478600001)(5660300002)(86362001)(2616005)(54906003)(8936002)(47076005)(426003)(2906002)(6666004)(336012)(40480700001)(41300700001)(26005)(4744005)(1076003)(7696005)(16526019)(40460700003)(186003)(82310400005)(36756003)(356005)(70586007)(70206006)(82740400003)(36860700001)(316002)(81166007)(8676002)(110136005)(4326008)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2022 06:11:15.1904 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 667c789b-da58-48b0-6ce3-08da6c722677 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB3748 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add depended header file to fix error on i386 due to implicit declaration of function ‘writeq’. Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality") Reported-by: Randy Dunlap Signed-off-by: Basavaraj Natikar --- drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c index 14a1578055b6..c6df959ec725 100644 --- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c +++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c @@ -7,7 +7,9 @@ * * Author: Basavaraj Natikar */ +#include #include + #include "amd_sfh_interface.h" static int amd_sfh_wait_response(struct amd_mp2_dev *mp2, u8 sid, u32 cmd_id) From patchwork Sat Jul 23 06:10:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Basavaraj Natikar X-Patchwork-Id: 12927091 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37D03CCA483 for ; Sat, 23 Jul 2022 06:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233059AbiGWGLV (ORCPT ); Sat, 23 Jul 2022 02:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbiGWGLU (ORCPT ); Sat, 23 Jul 2022 02:11:20 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1339130577; Fri, 22 Jul 2022 23:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JshtXQl2pmIW1mIXZj77Dt7w8Z5sp53w94P6E9uCplj3D5oShcnq97Ot7R9L0VYmujDF5rkT1EDm9AO7GQp8v2DLkQiHIFQRb76fbH7INcoo/jMhDWvz5Q85abaUgV9RIObI+VczEdVx1Ep3bo2F+Ar0eOdFTZoqnpYAsoNzdJyVDpnceaafSiw8pmCLsRHyz+1kTyW5bxvFf3S18q6wWBrZOFufPl4BSdCZQjUloZ7x9acA19QhdqUhEfHuawvzW8GxXoej16KrLQgWbpiHMIXvqOzIFB3xAyit7pUbgTWeLa3xhAwOtQgEn+UzpiLvMr6NM2MM5tbK/VhBfzZCfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yRXTQEaFzgEEIXj2IX2ESk39BWwqI9/7Qllerr/Qnxg=; b=NVJtgBwXGi10BxTuk8cnXK1ZNB3E5VX1UyR47Bp4KrBp81st3I98LNjUgr89Tnh1aY2vw8que0rRjT4xrlPXTYUf3B6fjgD+NkIjCZGXmoYnc81R1qRb/5O8Nt0nKpOzmivEqLZQxmaeWkr5WyN2q/FiZS3FEn4E1NNAPlynPd+vr9yxzE6YgfEm+Sdy8gX4CrH2LlM5AUA0LwtfOy7DZdjSEyiwMZomXah2thg+y564/YoWJFD90KJLwsQWtaWFKSeYUVsTtqW68JP+fL6NRPA42PGETHA7hqKZePsfUgNllr8ew011r2BvKHxpmRlUFKCoZvOkCO6LH5Bd6D9usA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yRXTQEaFzgEEIXj2IX2ESk39BWwqI9/7Qllerr/Qnxg=; b=5Goip/RgQ3b+EYDgwVcx7vUffDZil0BMW+kpnPeSQizip5aM+JbnRLYoCVwKv6IMJ14RsjqoPKuCNbMWJZ0j4aNgN+mEpGO25y5o9cWmsdbuaqMM1lW1SWEY+DZxIkE29ofwVbgvqUfnwWFjZ7YpU/nDqnFaY3u9uQygGuZNB7c= Received: from MW4PR03CA0115.namprd03.prod.outlook.com (2603:10b6:303:b7::30) by DM5PR12MB1353.namprd12.prod.outlook.com (2603:10b6:3:76::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21; Sat, 23 Jul 2022 06:11:16 +0000 Received: from CO1NAM11FT006.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b7:cafe::bf) by MW4PR03CA0115.outlook.office365.com (2603:10b6:303:b7::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.17 via Frontend Transport; Sat, 23 Jul 2022 06:11:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT006.mail.protection.outlook.com (10.13.174.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5458.17 via Frontend Transport; Sat, 23 Jul 2022 06:11:16 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sat, 23 Jul 2022 01:11:13 -0500 From: Basavaraj Natikar To: , , , , CC: , Basavaraj Natikar Subject: [PATCH for-next 2/2] HID: amd_sfh: Handle condition of "no sensors" Date: Sat, 23 Jul 2022 11:40:33 +0530 Message-ID: <20220723061033.1377061-3-Basavaraj.Natikar@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220723061033.1377061-1-Basavaraj.Natikar@amd.com> References: <20220723061033.1377061-1-Basavaraj.Natikar@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ef730a9-095f-4d0f-9e2d-08da6c72270d X-MS-TrafficTypeDiagnostic: DM5PR12MB1353:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R2aOIkC8eCvwxbQtHj/lLRoqbk9mtmIS95igP1R91C4zQYHz8XwOn4Zp8cjIcqkgcTDxHUdPxj3Qq4Qlz4fd+jhqvLPumcOUx6BNvumQuK3h+dhytA3hcgejf7JkNUUtU/qX/qkeKvxeX9OirWlwhz/qK7BGtCI4yxvWaMqOGfEu8PzBzEOlD3+omV4sNd+TuS+6xQ9cU4pA/TjQyKaXpebiRd8Z13NDkE0BBFaxtsqxFzwBfxPrWuirNQH8pvOp7OiVz/NxI1nh9gfm1kV7ub1AMiwEufhLb7WZY6wTe9fpRhDxJRdEnWJ0Arx6KkerE4Te7ABvwmaqXWLiQjAXGeI+idl9syFGshrjsjO2FoXnbj94CpgmN/MJqjZXwAEfT3iGQSuQX74EhIgrkRMzAyzJ3HJ6lTQC1PxScnBpZlCs6V7HOGFcOU3FOM4ozBieRdSzhUZ+2DyLdPOVNiRWvRU7jiPQohZUuqdJekLoFYv0KtD4n4HC6HtnSCwSGlHJpUnO7wyPcZknHgcRI3kI/f4ZA12iRgeWuZ4Fxrvhgir17+DGPdDUGJvj7oImb+BZn/XNN9dperBurRenIUX7Jugk5buI2nm6T0d4mvLf6iVHiu1s4jN/VTHhi6RClVlp4H20bbI0MV1cYEq6GmbGu4LkRm23+sZNMGM/HziwKEu8OGrS5VpLdcER1FCOm6uOwr0yFrKBH0GZxBzduPR5xUUg/+DVhDATNEacfH/STGBW7NdBVavF1+JFIlnh9sVKGlw3EbgQR+GBZhpp4+rWgkn9vOauJ3ZpvUCSG4kRfOOxw9fFQxP4hqFb/WZAUa+gRpHZA2aQ/f4t2FJ3bjmZdA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(396003)(346002)(136003)(376002)(39860400002)(36840700001)(46966006)(40470700004)(82310400005)(8676002)(16526019)(40460700003)(40480700001)(316002)(6666004)(41300700001)(81166007)(110136005)(54906003)(4326008)(478600001)(70206006)(70586007)(7696005)(1076003)(36756003)(5660300002)(336012)(2906002)(8936002)(26005)(4744005)(186003)(36860700001)(82740400003)(356005)(2616005)(426003)(47076005)(86362001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2022 06:11:16.1747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ef730a9-095f-4d0f-9e2d-08da6c72270d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT006.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1353 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add a check for num_hid_devices to handle special case the situation of "no sensors". Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Signed-off-by: Basavaraj Natikar --- drivers/hid/amd-sfh-hid/amd_sfh_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c index f95e623040f3..8275bba63611 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c @@ -225,6 +225,8 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata) mp2_ops->resume = amd_sfh_resume; cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, &cl_data->sensor_idx[0]); + if (cl_data->num_hid_devices == 0) + return -ENODEV; INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work); INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer);