From patchwork Tue Jul 16 09:54:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11045797 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 EF9FD112C for ; Tue, 16 Jul 2019 09:55:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4C47284DC for ; Tue, 16 Jul 2019 09:55:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5EBC285A9; Tue, 16 Jul 2019 09:55:03 +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,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 619C2284DC for ; Tue, 16 Jul 2019 09:55:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732320AbfGPJzC (ORCPT ); Tue, 16 Jul 2019 05:55:02 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:40678 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732300AbfGPJzC (ORCPT ); Tue, 16 Jul 2019 05:55:02 -0400 Received: by mail-pf1-f196.google.com with SMTP id p184so8853803pfp.7 for ; Tue, 16 Jul 2019 02:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wglnm+6yqzntyC9h13b4Wh3S/G9NJM2x5q1vPNkqSgU=; b=Dnnh+kwHRtS9hSr7z8dtYzFB/z6nWaIrUpsWPzeEf7Pb6hhhWP8YrQn6phTamDKNCJ r5ZsKcNuHQ+Eu35xX8eqMfOOc2GB9DW4slEjuF3JodDKrfbAZJm9l1Ooet/IVl5P6S6U Sz0UkF/tUwYvWd5MgI9me+GK3bjcCp8fr/g4H4xmlOpIqjjnkxFBhnxIteeX/R5pvcTo fFbz3ZpTfK6TPS/8AIdScSwOH9C9MzZ0EwKDGaxCnoaw6xQARQ5I0erDT6lXSXHRppbI cXuEmVGUB4B7r+3GGUarHf2AwnUa4MWpRJhKm59XYpfXh8j4IV3qZ+BtA2LAN7z6OqmG mGzw== 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=wglnm+6yqzntyC9h13b4Wh3S/G9NJM2x5q1vPNkqSgU=; b=c/FuqT3dBJss/Be+y+tZlka/C7JaNmAoqUoozmYU6rEznO0y0CQiyaSigmysuFjtTd isVZ2UCyUd5C7qbzd0aGmU+VsqfUJ/Mwhmq6wZnhagR8yCw5R9Nufutw5FWIReYb8QxU Vpcq9yVUNNQVX3+puYmvbviTnlXtfQFJkdmIahY+zUT85xMs8xv/P/sKMV67qqsEtWV0 SsTbuZArNx+TYWdElDD/sueKNy+BMHfOMzUp2vjYhjjc7QiWZx0H0Xg+JKXikhrcw2e2 9utAZGxhx8aC+Zf3QC8Vc5i4wdIeLE40qC5CaAE+oWHwfrHTTKmK/L6wy10V+U8h0xxH Rv3A== X-Gm-Message-State: APjAAAWMgb9ZbctW7x7cBaLjPmeOneOnFGEpLgsI2v+wfJUpyokd+jDw 7gmm558HGESrI63FPgaEdB5WxQ== X-Google-Smtp-Source: APXvYqwE4djRSjudt1aj7hnAPyyjlo+Rw7Ep4ui1p1jCkZWoK7MWPCNdhvgpR/DouQUGSOiXwWBkjg== X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr34610804pjo.133.1563270901894; Tue, 16 Jul 2019 02:55:01 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id o14sm42384517pfh.153.2019.07.16.02.55.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jul 2019 02:55:01 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] video: sa1100fb: Remove cpufreq policy notifier Date: Tue, 16 Jul 2019 15:24:46 +0530 Message-Id: <7163e57cfa1780d42732fa6b5ec424c24d1d4dc8.1563270828.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cpufreq policy notifier's CPUFREQ_ADJUST notification is going to get removed soon. The notifier callback sa1100fb_freq_policy() isn't doing anything apart from printing a debug message on CPUFREQ_ADJUST notification. There is no point in keeping an otherwise empty callback and registering the notifier. Remove it. Signed-off-by: Viresh Kumar Acked-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/sa1100fb.c | 27 --------------------------- drivers/video/fbdev/sa1100fb.h | 1 - 2 files changed, 28 deletions(-) diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c index f7f8dee044b1..ae2bcfee338a 100644 --- a/drivers/video/fbdev/sa1100fb.c +++ b/drivers/video/fbdev/sa1100fb.c @@ -1005,31 +1005,6 @@ sa1100fb_freq_transition(struct notifier_block *nb, unsigned long val, } return 0; } - -static int -sa1100fb_freq_policy(struct notifier_block *nb, unsigned long val, - void *data) -{ - struct sa1100fb_info *fbi = TO_INF(nb, freq_policy); - struct cpufreq_policy *policy = data; - - switch (val) { - case CPUFREQ_ADJUST: - dev_dbg(fbi->dev, "min dma period: %d ps, " - "new clock %d kHz\n", sa1100fb_min_dma_period(fbi), - policy->max); - /* todo: fill in min/max values */ - break; - case CPUFREQ_NOTIFY: - do {} while(0); - /* todo: panic if min/max values aren't fulfilled - * [can't really happen unless there's a bug in the - * CPU policy verififcation process * - */ - break; - } - return 0; -} #endif #ifdef CONFIG_PM @@ -1242,9 +1217,7 @@ static int sa1100fb_probe(struct platform_device *pdev) #ifdef CONFIG_CPU_FREQ fbi->freq_transition.notifier_call = sa1100fb_freq_transition; - fbi->freq_policy.notifier_call = sa1100fb_freq_policy; cpufreq_register_notifier(&fbi->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); - cpufreq_register_notifier(&fbi->freq_policy, CPUFREQ_POLICY_NOTIFIER); #endif /* This driver cannot be unloaded at the moment */ diff --git a/drivers/video/fbdev/sa1100fb.h b/drivers/video/fbdev/sa1100fb.h index 7a1a9ca33cec..d0aa33b0b88a 100644 --- a/drivers/video/fbdev/sa1100fb.h +++ b/drivers/video/fbdev/sa1100fb.h @@ -64,7 +64,6 @@ struct sa1100fb_info { #ifdef CONFIG_CPU_FREQ struct notifier_block freq_transition; - struct notifier_block freq_policy; #endif const struct sa1100fb_mach_info *inf;