[v2,01/17] pinctrl: cedarfork: Get rid of unneeded ->probe() stub

Message ID 20181106155439.51354-1-andriy.shevchenko@linux.intel.com
State New
Headers show
Series
  • [v2,01/17] pinctrl: cedarfork: Get rid of unneeded ->probe() stub
Related show

Commit Message

Andy Shevchenko Nov. 6, 2018, 3:54 p.m.
The local ->probe() stub does nothing except calling
a generic Intel pin control probe function. Thus,
it's not needed and generic function may be called directly.

Convert the driver accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/intel/pinctrl-cedarfork.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Mika Westerberg Nov. 7, 2018, 11 a.m. | #1
On Tue, Nov 06, 2018 at 05:54:23PM +0200, Andy Shevchenko wrote:
> The local ->probe() stub does nothing except calling
> a generic Intel pin control probe function. Thus,
> it's not needed and generic function may be called directly.
> 
> Convert the driver accordingly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks Andy! :)

For the whole series,

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Andy Shevchenko Nov. 7, 2018, 3:42 p.m. | #2
On Wed, Nov 07, 2018 at 01:00:22PM +0200, Mika Westerberg wrote:
> On Tue, Nov 06, 2018 at 05:54:23PM +0200, Andy Shevchenko wrote:
> > The local ->probe() stub does nothing except calling
> > a generic Intel pin control probe function. Thus,
> > it's not needed and generic function may be called directly.
> > 
> > Convert the driver accordingly.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Thanks Andy! :)
> 
> For the whole series,
> 
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Thanks!

Patch

diff --git a/drivers/pinctrl/intel/pinctrl-cedarfork.c b/drivers/pinctrl/intel/pinctrl-cedarfork.c
index 7e068fc61ce1..0a2bd108784f 100644
--- a/drivers/pinctrl/intel/pinctrl-cedarfork.c
+++ b/drivers/pinctrl/intel/pinctrl-cedarfork.c
@@ -330,21 +330,16 @@  static const struct intel_pinctrl_soc_data cdf_soc_data = {
 	.ncommunities = ARRAY_SIZE(cdf_communities),
 };
 
-static int cdf_pinctrl_probe(struct platform_device *pdev)
-{
-	return intel_pinctrl_probe(pdev, &cdf_soc_data);
-}
-
 static INTEL_PINCTRL_PM_OPS(cdf_pinctrl_pm_ops);
 
 static const struct acpi_device_id cdf_pinctrl_acpi_match[] = {
-	{ "INTC3001" },
+	{ "INTC3001", (kernel_ulong_t)&cdf_soc_data },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, cdf_pinctrl_acpi_match);
 
 static struct platform_driver cdf_pinctrl_driver = {
-	.probe = cdf_pinctrl_probe,
+	.probe = intel_pinctrl_probe_by_hid,
 	.driver = {
 		.name = "cedarfork-pinctrl",
 		.acpi_match_table = cdf_pinctrl_acpi_match,