From patchwork Tue Jul 23 06:14:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11053887 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 A60051580 for ; Tue, 23 Jul 2019 06:15:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94B8C284CE for ; Tue, 23 Jul 2019 06:15:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 891AB285E1; Tue, 23 Jul 2019 06:15:05 +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 12FCB285E2 for ; Tue, 23 Jul 2019 06:15:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388153AbfGWGOp (ORCPT ); Tue, 23 Jul 2019 02:14:45 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:41347 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388146AbfGWGOo (ORCPT ); Tue, 23 Jul 2019 02:14:44 -0400 Received: by mail-pl1-f195.google.com with SMTP id m9so20090591pls.8 for ; Mon, 22 Jul 2019 23:14:43 -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=WSy97MHTyvjB+tNxNcL94WmxX39zNt2juy/xtyGFT8Y=; b=qtTFfvyZQ+n3BuQV5HhEc01LRgT8Q3RVePNpiuu1aFBWLZo5PygfiqyPF5qZVn9kMs Ap/gS6I2/VtC79MvUUIFxAKz6PdL+jGvXs+qAQdfW+vWgCs0L5x6oMb817ZLrMRe+HJQ WQpmjP9g8/XywOFL87iUm1K0rWmzH6s0K/FknZkn08PcKHDV9j9derGTZZzn51hs2CvT bcbSjLS3S1IYcrl3kb/7UKnHwtQZcYDaFH2WL5o7WNBYy0kLw3qMjxeMVKpIO/5avxle slCcswwRW/HdUXQIyAaM/e+zokBpHfS8HYwRX12Njthf0f1F944t4XBK4n+1xmq6SCdT dckw== 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=WSy97MHTyvjB+tNxNcL94WmxX39zNt2juy/xtyGFT8Y=; b=sUJXdmLJcykgmVZKvSVg56Ssoe2M9DvlW9pjhwgsCJr4Uj+rbKksJX/N5CSyYjYYcW TJIHyRUcVVJzBnOCyQDTXQlM+GMy5qi1eGkTsvpkQ0YWRKeI/F7Qjk+JtEqmvBBDGIJW sLMu3akCz8rryTfQkFS2TWPl5etmPVandHmhSNQ+QkN7O4mKS7QCMwsM/xeBzGMhdivT ydgqA/pUQjEaOaFS46gHFoV4I81VIZD0z0DoDHCGw0t/L3/5Jm4vlYJz3mV1hdydA1zj ZFi6Mw3nqyFFx0eMnnPdrBFiL+rgzU2lMYjlrQHjfxa7Aj+Lj0A3S4xv0GW7DVXj20vW gBQQ== X-Gm-Message-State: APjAAAWRlCdJxTozeIANHtJH7LlLJUsyShdX+LwTgOlBJf9aRPRIUx3h CqKFdBd0iXIQOU34j7F6bFcZZg== X-Google-Smtp-Source: APXvYqzUcFU3wsNIG8Q7OYgyK85j0SXIDJZX0XAXT4Zwbjja4zDuD7rUEYw8CerpGmcATZitxlwbIA== X-Received: by 2002:a17:902:a504:: with SMTP id s4mr56706631plq.117.1563862483299; Mon, 22 Jul 2019 23:14:43 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id o3sm76723419pje.1.2019.07.22.23.14.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jul 2019 23:14:42 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Bartlomiej Zolnierkiewicz 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 V2 07/10] video: sa1100fb: Remove cpufreq policy notifier Date: Tue, 23 Jul 2019 11:44:07 +0530 Message-Id: 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. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Viresh Kumar --- 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; From patchwork Tue Jul 23 06:14:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 11053881 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 8DC49912 for ; Tue, 23 Jul 2019 06:14:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EF64285B9 for ; Tue, 23 Jul 2019 06:14:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70086284CE; Tue, 23 Jul 2019 06:14:51 +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=unavailable 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 187E9284CE for ; Tue, 23 Jul 2019 06:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388145AbfGWGOu (ORCPT ); Tue, 23 Jul 2019 02:14:50 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42857 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388162AbfGWGOr (ORCPT ); Tue, 23 Jul 2019 02:14:47 -0400 Received: by mail-pf1-f194.google.com with SMTP id q10so18569389pff.9 for ; Mon, 22 Jul 2019 23:14:46 -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=rUdeKFVKj/j46aY/YcoOji4W0Ij6fg/KFJvYkeK7wzw=; b=YdOCMHbEQbXw8KubWzfOBaz7EB1B9f22y/t/+FTFKWx6jaFEuKDB5E3Sdj+cgk/DqY C9cxtOOhSrNaS0qcgK+e3peT5VxHr1x8GRySc1B8JNaI4BFnBdNZKAcPcQwlFhAuZnHM fVZrfoQqSU7JY3To8jmisIml+v18EtMwAP2mG9m2TZV0803DLrB/agmYbIynLjJbpWGf CEx548oc6YgKawUdx4hUVc63pqEnTiPyaA84BAupYaEGnhrc2rFI0wqFtyI4YVcC2EqM TcblXyTlgI5zs0HecA/SZBqEEZyaW8DH0Iy3gUTOjqAgrxmynKEqKoeWUy9kWzXO4Cue ThYQ== 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=rUdeKFVKj/j46aY/YcoOji4W0Ij6fg/KFJvYkeK7wzw=; b=Wk7vgqDD522A9EuvO3Ifb0YH6qmTE7xTN7+/rR+x6Gc+gV6z53xezSaJ064YfAw08s oY3LDRCfpQtVFus86tD78levygzu2B+LDgFGBEHUlU4UDVz6fZDTSdWJyDX6y4tA4ElU naCzPaAA4tJhe+Q51QM3wrBovBJVdaxkwHaibHpP1Rvi19stNVIP+qG/xcDyMyp4iyzB 7ofx5bZs6NdhdzRoRvWRnW/b+qcffYIWQ9vjE5o997rX5RGDF5tw4jMuHqaNzDhiPNI9 mfSH7zg5/e8lNahuLukPI/ZG3PVjsS5bLSB2OiXmC01jVrnSmpQh3S42rcUXsNxQqabv zNpQ== X-Gm-Message-State: APjAAAXMzURXvFcz8NM41uvmQ4syZIrk/9YJZYHvM8OhufgYzwKeeWw2 4eeihSEAmnxCrs0rMaesLHBbrQ== X-Google-Smtp-Source: APXvYqzYmC0czirjB9JZaCwmGJpEhIA8u9rhpfNc/1Lkv6/WiUNTY1TurBq8xS5qTAzrc9zunXfj2g== X-Received: by 2002:a63:2148:: with SMTP id s8mr73371962pgm.336.1563862486415; Mon, 22 Jul 2019 23:14:46 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id j10sm3176159pfn.188.2019.07.22.23.14.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jul 2019 23:14:45 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Bartlomiej Zolnierkiewicz 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 V2 08/10] video: pxafb: Remove cpufreq policy notifier Date: Tue, 23 Jul 2019 11:44:08 +0530 Message-Id: <56ea0fb68b99d343b093bc517024356a18f780e7.1563862014.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 pxafb_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. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Viresh Kumar --- drivers/video/fbdev/pxafb.c | 21 --------------------- drivers/video/fbdev/pxafb.h | 1 - 2 files changed, 22 deletions(-) diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c index 4282cb117b92..f70c9f79622e 100644 --- a/drivers/video/fbdev/pxafb.c +++ b/drivers/video/fbdev/pxafb.c @@ -1678,24 +1678,6 @@ pxafb_freq_transition(struct notifier_block *nb, unsigned long val, void *data) } return 0; } - -static int -pxafb_freq_policy(struct notifier_block *nb, unsigned long val, void *data) -{ - struct pxafb_info *fbi = TO_INF(nb, freq_policy); - struct fb_var_screeninfo *var = &fbi->fb.var; - struct cpufreq_policy *policy = data; - - switch (val) { - case CPUFREQ_ADJUST: - pr_debug("min dma period: %d ps, " - "new clock %d kHz\n", pxafb_display_dma_period(var), - policy->max); - /* TODO: fill in min/max values */ - break; - } - return 0; -} #endif #ifdef CONFIG_PM @@ -2400,11 +2382,8 @@ static int pxafb_probe(struct platform_device *dev) #ifdef CONFIG_CPU_FREQ fbi->freq_transition.notifier_call = pxafb_freq_transition; - fbi->freq_policy.notifier_call = pxafb_freq_policy; cpufreq_register_notifier(&fbi->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); - cpufreq_register_notifier(&fbi->freq_policy, - CPUFREQ_POLICY_NOTIFIER); #endif /* diff --git a/drivers/video/fbdev/pxafb.h b/drivers/video/fbdev/pxafb.h index b641289c8a99..86b1e9ab1a38 100644 --- a/drivers/video/fbdev/pxafb.h +++ b/drivers/video/fbdev/pxafb.h @@ -162,7 +162,6 @@ struct pxafb_info { #ifdef CONFIG_CPU_FREQ struct notifier_block freq_transition; - struct notifier_block freq_policy; #endif struct regulator *lcd_supply;