From patchwork Fri Jun 16 04:40:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBLxJlwaWXFhA==?= X-Patchwork-Id: 9790511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F47F60326 for ; Fri, 16 Jun 2017 04:42:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DEF82855C for ; Fri, 16 Jun 2017 04:42:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02D4A28608; Fri, 16 Jun 2017 04:42:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACAA12855C for ; Fri, 16 Jun 2017 04:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdFPElQ (ORCPT ); Fri, 16 Jun 2017 00:41:16 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:36098 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbdFPElO (ORCPT ); Fri, 16 Jun 2017 00:41:14 -0400 Received: by mail-wr0-f195.google.com with SMTP id 77so5298825wrb.3 for ; Thu, 15 Jun 2017 21:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kempniu.pl; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2207/M9DBqHC7YjwrqY0hjYyM4LDHApElNzqFfGdIAE=; b=ftYV+LdQASSwUdZx6ytlBvQtHcIw0paA/cQ3zCn/KqDbMd6pfMWQUMIt0Kp7/pi4xy GyO0ylcXkwKKjOUaw4lwxe3PRHAH16UnI+wZBrgaPIfrf8wDuW5I3+p2T/zrFVTN6n6S idvtBa3GSrRCMAW+hiHiEZY0gESQY9xQyfWk0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2207/M9DBqHC7YjwrqY0hjYyM4LDHApElNzqFfGdIAE=; b=dW7bEZUtOGksaZ+jJoyxZE9HICkoxpBoUQskGH0FBbaUyVs6RfzAMz3YF/ol/vV2ZX 2J+WS3cyFu46Y2SPKjnnWZ+s97YBa3pjL4jYWumb4CAcjjgrGkE417Hy4l2hINl1kFNc t/A8F7VecqIJ7ONAybI9+yCaH1T+BH1aTvL4erZicuqRd4aM5QE2t9PZ6xJQVE+BpOo1 JqfocXpc62bIdUQQJA1ViUF1hlRBzZoFU8pyomxuTkFtK0IoR85xIz5bLNIeLEP6/MgI d5ACbI0o/c8hBRjtLafQppOvCBuAg6UFgwoEH1Ow0DBxlq2or/2WUWfL5h1ZX4OF25Rd wO1A== X-Gm-Message-State: AKS2vOyOsVf2tUtvNrcWwYunI+A6nQ0rLf3CMAXmTUeOYK4fCbAWwYcH ihqrY2hCYbubQfZ/ X-Received: by 10.223.164.23 with SMTP id d23mr6084651wra.54.1497588073098; Thu, 15 Jun 2017 21:41:13 -0700 (PDT) Received: from kmp-mobile.hq.kempniu.pl (kmp-mobile.hq.kempniu.pl. [2001:470:64df:111::2d90]) by smtp.googlemail.com with ESMTPSA id g3sm2026681wrd.11.2017.06.15.21.41.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 21:41:12 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= To: Jonathan Woithe , Darren Hart , Andy Shevchenko Cc: platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] platform/x86: fujitsu-laptop: use strcpy to set ACPI device names and classes Date: Fri, 16 Jun 2017 06:40:54 +0200 Message-Id: <20170616044058.30443-4-kernel@kempniu.pl> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170616044058.30443-1-kernel@kempniu.pl> References: <20170616044058.30443-1-kernel@kempniu.pl> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No formatting is needed when setting ACPI device name and class, so switch to using strcpy() for this purpose. Signed-off-by: Michał Kępień --- drivers/platform/x86/fujitsu-laptop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index c64d5305ff37..06d04500dac0 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -411,8 +411,8 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device) return -ENOMEM; fujitsu_bl = priv; - sprintf(acpi_device_name(device), "%s", ACPI_FUJITSU_BL_DEVICE_NAME); - sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); + strcpy(acpi_device_name(device), ACPI_FUJITSU_BL_DEVICE_NAME); + strcpy(acpi_device_class(device), ACPI_FUJITSU_CLASS); device->driver_data = priv; error = acpi_fujitsu_bl_input_setup(device); @@ -800,9 +800,8 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device) WARN_ONCE(fext, "More than one FUJ02E3 ACPI device was found. Driver may not work as intended."); fext = device; - sprintf(acpi_device_name(device), "%s", - ACPI_FUJITSU_LAPTOP_DEVICE_NAME); - sprintf(acpi_device_class(device), "%s", ACPI_FUJITSU_CLASS); + strcpy(acpi_device_name(device), ACPI_FUJITSU_LAPTOP_DEVICE_NAME); + strcpy(acpi_device_class(device), ACPI_FUJITSU_CLASS); device->driver_data = priv; error = acpi_fujitsu_laptop_input_setup(device);