From patchwork Fri Aug 10 18:51:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10563097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A6AE174A for ; Fri, 10 Aug 2018 19:15:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 282BD2BC9C for ; Fri, 10 Aug 2018 19:15:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 197BF2BCAB; Fri, 10 Aug 2018 19:15:07 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 3C12F2BC9C for ; Fri, 10 Aug 2018 19:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727146AbeHJVqN (ORCPT ); Fri, 10 Aug 2018 17:46:13 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42156 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726982AbeHJVqN (ORCPT ); Fri, 10 Aug 2018 17:46:13 -0400 Received: by mail-lj1-f194.google.com with SMTP id f1-v6so7957775ljc.9; Fri, 10 Aug 2018 12:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=o4CIS/PJ43brDR41dgrSNT2DwCqVA4nKrYsTlMbzZ1o=; b=sB0jwnL1fIxOGoN3lEHAz2fE0nzttrxjwC4A6QxCskwQb4a6OJPw0oahiw+gX37MyR A9caiFmTYIUuld8Qtfnn9qvlzDv1pGdaS0jJCrhW24i83+9fhcKAyb9QKqfyCCuvz1sI gl68T7VqqC+tZ0yMHqsP71St2pVg2Cli6ToyKcQ18bfmP93V7PF3x87GltBY9T+qq8BI jo6o9oWl4Bb6u3tRAhA9vc6/7P0Qs9KhJMpydmauvADpOFJFaGuFSMhm9uOf/npsbo+J iV7eDjwDjOp3oAyM77p8tHqH5h4/6SgmZU3MvsQm+IQrWT6u+w++hpGT1580DU64P3sq XAOQ== 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; bh=o4CIS/PJ43brDR41dgrSNT2DwCqVA4nKrYsTlMbzZ1o=; b=s/UsSyEzExEU2q3YJu3Ako3yqq/aQWQTOjhE3a00GqJF/1CjGnwLV4S4G3LJgmWXaE 7/GmXrpkoy2+yOujcP9reUCH7Z8cVzDlx5g85BF/HalYgS6J7VegSzTWvcnqC+qDodmH JuOgasbniXgNTHMGVvqOT5fNGKK6fsrSAVtnSelt8s3b8/F+/RIA/ZzY/MotS6WipCxV Ed69TqHXea2KATtPL9RcFjH3VoE3XzYCBQFrrEb2b4C09S/xD6lAvWDlL2jJS34BNlzI s6C0R3pOZZviygIbXveGxS8kXhB10x+2dwwPgf6wiZ2hGYOh1gfki1tmYnDtjwH4Lm2E Ag9A== X-Gm-Message-State: AOUpUlH0NHNeAxN0XaEbEaSGfky+QaePeQx1jGTWyxjG2jkjFLW6hfMn 04bANu2Gb8/KoDb1qgmT5nQ= X-Google-Smtp-Source: AA+uWPx/o4z4oSsmVxdCjrMF+CskXi3F3lAgmN7E9e2Y8NnGuiWySWdSEzUVZA+qHZQaAGAWBMx1mg== X-Received: by 2002:a2e:21d5:: with SMTP id h82-v6mr5496010lji.46.1533928502202; Fri, 10 Aug 2018 12:15:02 -0700 (PDT) Received: from localhost.localdomain (c-2ec24faa-74736162.cust.telenor.se. [46.194.79.170]) by smtp.gmail.com with ESMTPSA id d23-v6sm1734931ljg.17.2018.08.10.12.15.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 12:15:00 -0700 (PDT) From: Marcus Folkesson To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Marcus Folkesson Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iio: dac: max517: avoid using CONFIG_PM_SLEEP Date: Fri, 10 Aug 2018 20:51:08 +0200 Message-Id: <20180810185110.12710-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.11.0.rc2 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SIMPLE_DEV_PM_OPS() is already doing this. Signed-off-by: Marcus Folkesson --- drivers/iio/dac/max517.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index 1d853247a205..451d10e323cf 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -113,15 +113,14 @@ static int max517_write_raw(struct iio_dev *indio_dev, return ret; } -#ifdef CONFIG_PM_SLEEP -static int max517_suspend(struct device *dev) +static int __maybe_unused max517_suspend(struct device *dev) { u8 outbuf = COMMAND_PD; return i2c_master_send(to_i2c_client(dev), &outbuf, 1); } -static int max517_resume(struct device *dev) +static int __maybe_unused max517_resume(struct device *dev) { u8 outbuf = 0; @@ -129,10 +128,6 @@ static int max517_resume(struct device *dev) } static SIMPLE_DEV_PM_OPS(max517_pm_ops, max517_suspend, max517_resume); -#define MAX517_PM_OPS (&max517_pm_ops) -#else -#define MAX517_PM_OPS NULL -#endif static const struct iio_info max517_info = { .read_raw = max517_read_raw, @@ -229,7 +224,7 @@ MODULE_DEVICE_TABLE(i2c, max517_id); static struct i2c_driver max517_driver = { .driver = { .name = MAX517_DRV_NAME, - .pm = MAX517_PM_OPS, + .pm = &max517_pm_ops, }, .probe = max517_probe, .remove = max517_remove,