Message ID | 0e8188d1-e35c-162b-6657-b22e8034483c@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | i2c: i801: Series with improvements | expand |
On Fri, Aug 06, 2021 at 11:18:40PM +0200, Heiner Kallweit wrote: > The platform data structures are used in the respective i801_add_tco > functions only. Therefore we can make the definitions local to these > functions. Side note: usually we refer to the functions like "i801_add_tco()" (w/o quotes).
On Fri, Aug 06, 2021 at 11:18:40PM +0200, Heiner Kallweit wrote: > The platform data structures are used in the respective i801_add_tco > functions only. Therefore we can make the definitions local to these > functions. > > Reviewed-by: Jean Delvare <jdelvare@suse.de> > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Hmm, this doesn't apply on i2c/for-mergewindow. Did I miss a patch?
On Sat, Oct 02, 2021 at 09:44:55AM +0200, Wolfram Sang wrote: > On Fri, Aug 06, 2021 at 11:18:40PM +0200, Heiner Kallweit wrote: > > The platform data structures are used in the respective i801_add_tco > > functions only. Therefore we can make the definitions local to these > > functions. > > > > Reviewed-by: Jean Delvare <jdelvare@suse.de> > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > > Hmm, this doesn't apply on i2c/for-mergewindow. Did I miss a patch? Since a lot of other i801 patches have been merged meanwhile, I'd need this patch rebased if you still want it to be applied. Thanks for all your i801 work!
On 29.11.2021 09:58, Wolfram Sang wrote: > On Sat, Oct 02, 2021 at 09:44:55AM +0200, Wolfram Sang wrote: >> On Fri, Aug 06, 2021 at 11:18:40PM +0200, Heiner Kallweit wrote: >>> The platform data structures are used in the respective i801_add_tco >>> functions only. Therefore we can make the definitions local to these >>> functions. >>> >>> Reviewed-by: Jean Delvare <jdelvare@suse.de> >>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> >> >> Hmm, this doesn't apply on i2c/for-mergewindow. Did I miss a patch? > > Since a lot of other i801 patches have been merged meanwhile, I'd need > this patch rebased if you still want it to be applied. Thanks for all > your i801 work! > I just sent a rebased version.
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 88745e3bc..242bdd2ae 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -1470,15 +1470,14 @@ static inline unsigned int i801_get_adapter_class(struct i801_priv *priv) } #endif -static const struct itco_wdt_platform_data spt_tco_platform_data = { - .name = "Intel PCH", - .version = 4, -}; - static struct platform_device * i801_add_tco_spt(struct i801_priv *priv, struct pci_dev *pci_dev, struct resource *tco_res) { + static const struct itco_wdt_platform_data pldata = { + .name = "Intel PCH", + .version = 4, + }; static DEFINE_MUTEX(p2sb_mutex); struct resource *res; unsigned int devfn; @@ -1522,22 +1521,20 @@ i801_add_tco_spt(struct i801_priv *priv, struct pci_dev *pci_dev, res->flags = IORESOURCE_MEM; return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1, - tco_res, 2, &spt_tco_platform_data, - sizeof(spt_tco_platform_data)); + tco_res, 2, &pldata, sizeof(pldata)); } -static const struct itco_wdt_platform_data cnl_tco_platform_data = { - .name = "Intel PCH", - .version = 6, -}; - static struct platform_device * i801_add_tco_cnl(struct i801_priv *priv, struct pci_dev *pci_dev, struct resource *tco_res) { - return platform_device_register_resndata(&pci_dev->dev, - "iTCO_wdt", -1, tco_res, 1, &cnl_tco_platform_data, - sizeof(cnl_tco_platform_data)); + static const struct itco_wdt_platform_data pldata = { + .name = "Intel PCH", + .version = 6, + }; + + return platform_device_register_resndata(&pci_dev->dev, "iTCO_wdt", -1, + tco_res, 1, &pldata, sizeof(pldata)); } static void i801_add_tco(struct i801_priv *priv)