diff mbox series

[v2,2/4] mfd: intel-lpss: Utilize i2c-designware.h

Message ID 20240425002642.2053657-3-florian.fainelli@broadcom.com (mailing list archive)
State Superseded
Headers show
Series Define i2c_designware in a header file | expand

Checks

Context Check Description
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Florian Fainelli April 25, 2024, 12:26 a.m. UTC
Rather than open code the i2c_designware string, utilize the newly
defined constant in i2c-designware.h.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/mfd/intel-lpss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andy Shevchenko April 25, 2024, 9:34 a.m. UTC | #1
On Wed, Apr 24, 2024 at 05:26:40PM -0700, Florian Fainelli wrote:
> Rather than open code the i2c_designware string, utilize the newly
> defined constant in i2c-designware.h.

...

> +#include <linux/platform_data/i2c-designware.h>

Please, group this with linux/dma/idma64.h below.

...

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
in case this go anywhere.
Lee Jones May 2, 2024, 10 a.m. UTC | #2
On Wed, 24 Apr 2024, Florian Fainelli wrote:

> Rather than open code the i2c_designware string, utilize the newly
> defined constant in i2c-designware.h.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
>  drivers/mfd/intel-lpss.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
> index 2a9018112dfc..551560beff7b 100644
> --- a/drivers/mfd/intel-lpss.c
> +++ b/drivers/mfd/intel-lpss.c
> @@ -24,6 +24,7 @@
>  #include <linux/ioport.h>
>  #include <linux/mfd/core.h>
>  #include <linux/module.h>
> +#include <linux/platform_data/i2c-designware.h>
>  #include <linux/pm.h>
>  #include <linux/pm_qos.h>
>  #include <linux/pm_runtime.h>
> @@ -116,7 +117,7 @@ static const struct mfd_cell intel_lpss_idma64_cell = {
>  };
>  
>  static const struct mfd_cell intel_lpss_i2c_cell = {
> -	.name = "i2c_designware",
> +	.name = I2C_DESIGNWARE_NAME,
>  	.num_resources = ARRAY_SIZE(intel_lpss_dev_resources),
>  	.resources = intel_lpss_dev_resources,

I explained why I don't like this in v1 this morning.

Please take a look.
diff mbox series

Patch

diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c
index 2a9018112dfc..551560beff7b 100644
--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -24,6 +24,7 @@ 
 #include <linux/ioport.h>
 #include <linux/mfd/core.h>
 #include <linux/module.h>
+#include <linux/platform_data/i2c-designware.h>
 #include <linux/pm.h>
 #include <linux/pm_qos.h>
 #include <linux/pm_runtime.h>
@@ -116,7 +117,7 @@  static const struct mfd_cell intel_lpss_idma64_cell = {
 };
 
 static const struct mfd_cell intel_lpss_i2c_cell = {
-	.name = "i2c_designware",
+	.name = I2C_DESIGNWARE_NAME,
 	.num_resources = ARRAY_SIZE(intel_lpss_dev_resources),
 	.resources = intel_lpss_dev_resources,
 };