LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss
@ 2015-02-26  9:13 Krzysztof Kozlowski
  2015-02-26  9:13 ` [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-26  9:13 UTC (permalink / raw)
  To: Sangbeom Kim, Samuel Ortiz, Lee Jones, linux-kernel; +Cc: Krzysztof Kozlowski

The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
Power Loss) are never enabled. These are left-overs from board files.
After removing them the driver's shutdown callback is empty so get rid
of it as well.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
Changes since v1:
1. None. Patch applied by Andrew Morton. Resending for Lee Jones.
---
 drivers/rtc/rtc-s5m.c | 60 ---------------------------------------------------
 1 file changed, 60 deletions(-)

diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
index 89ac1d5083c6..4008b84246ca 100644
--- a/drivers/rtc/rtc-s5m.c
+++ b/drivers/rtc/rtc-s5m.c
@@ -48,8 +48,6 @@ struct s5m_rtc_reg_config {
 	unsigned int alarm0;
 	/* First register for alarm 1, seconds */
 	unsigned int alarm1;
-	/* SMPL/WTSR register */
-	unsigned int smpl_wtsr;
 	/*
 	 * Register for update flag (UDR). Typically setting UDR field to 1
 	 * will enable update of time or alarm register. Then it will be
@@ -67,7 +65,6 @@ static const struct s5m_rtc_reg_config s5m_rtc_regs = {
 	.ctrl			= S5M_ALARM1_CONF,
 	.alarm0			= S5M_ALARM0_SEC,
 	.alarm1			= S5M_ALARM1_SEC,
-	.smpl_wtsr		= S5M_WTSR_SMPL_CNTL,
 	.rtc_udr_update		= S5M_RTC_UDR_CON,
 	.rtc_udr_mask		= S5M_RTC_UDR_MASK,
 };
@@ -82,7 +79,6 @@ static const struct s5m_rtc_reg_config s2mps_rtc_regs = {
 	.ctrl			= S2MPS_RTC_CTRL,
 	.alarm0			= S2MPS_ALARM0_SEC,
 	.alarm1			= S2MPS_ALARM1_SEC,
-	.smpl_wtsr		= S2MPS_WTSR_SMPL_CNTL,
 	.rtc_udr_update		= S2MPS_RTC_UDR_CON,
 	.rtc_udr_mask		= S2MPS_RTC_WUDR_MASK,
 };
@@ -96,7 +92,6 @@ struct s5m_rtc_info {
 	int irq;
 	int device_type;
 	int rtc_24hr_mode;
-	bool wtsr_smpl;
 	const struct s5m_rtc_reg_config	*regs;
 };
 
@@ -597,28 +592,6 @@ static const struct rtc_class_ops s5m_rtc_ops = {
 	.alarm_irq_enable = s5m_rtc_alarm_irq_enable,
 };
 
-static void s5m_rtc_enable_wtsr(struct s5m_rtc_info *info, bool enable)
-{
-	int ret;
-	ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
-				 WTSR_ENABLE_MASK,
-				 enable ? WTSR_ENABLE_MASK : 0);
-	if (ret < 0)
-		dev_err(info->dev, "%s: fail to update WTSR reg(%d)\n",
-			__func__, ret);
-}
-
-static void s5m_rtc_enable_smpl(struct s5m_rtc_info *info, bool enable)
-{
-	int ret;
-	ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
-				 SMPL_ENABLE_MASK,
-				 enable ? SMPL_ENABLE_MASK : 0);
-	if (ret < 0)
-		dev_err(info->dev, "%s: fail to update SMPL reg(%d)\n",
-			__func__, ret);
-}
-
 static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
 {
 	u8 data[2];
@@ -715,7 +688,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
 	info->dev = &pdev->dev;
 	info->s5m87xx = s5m87xx;
 	info->device_type = s5m87xx->device_type;
-	info->wtsr_smpl = s5m87xx->wtsr_smpl;
 
 	if (s5m87xx->irq_data) {
 		info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
@@ -731,11 +703,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
 
 	ret = s5m8767_rtc_init_reg(info);
 
-	if (info->wtsr_smpl) {
-		s5m_rtc_enable_wtsr(info, true);
-		s5m_rtc_enable_smpl(info, true);
-	}
-
 	device_init_wakeup(&pdev->dev, 1);
 
 	info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
@@ -768,36 +735,10 @@ err:
 	return ret;
 }
 
-static void s5m_rtc_shutdown(struct platform_device *pdev)
-{
-	struct s5m_rtc_info *info = platform_get_drvdata(pdev);
-	int i;
-	unsigned int val = 0;
-	if (info->wtsr_smpl) {
-		for (i = 0; i < 3; i++) {
-			s5m_rtc_enable_wtsr(info, false);
-			regmap_read(info->regmap, info->regs->smpl_wtsr, &val);
-			pr_debug("%s: WTSR_SMPL reg(0x%02x)\n", __func__, val);
-			if (val & WTSR_ENABLE_MASK)
-				pr_emerg("%s: fail to disable WTSR\n",
-					 __func__);
-			else {
-				pr_info("%s: success to disable WTSR\n",
-					__func__);
-				break;
-			}
-		}
-	}
-	/* Disable SMPL when power off */
-	s5m_rtc_enable_smpl(info, false);
-}
-
 static int s5m_rtc_remove(struct platform_device *pdev)
 {
 	struct s5m_rtc_info *info = platform_get_drvdata(pdev);
 
-	/* Perform also all shutdown steps when removing */
-	s5m_rtc_shutdown(pdev);
 	i2c_unregister_device(info->i2c);
 
 	return 0;
@@ -842,7 +783,6 @@ static struct platform_driver s5m_rtc_driver = {
 	},
 	.probe		= s5m_rtc_probe,
 	.remove		= s5m_rtc_remove,
-	.shutdown	= s5m_rtc_shutdown,
 	.id_table	= s5m_rtc_id,
 };
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL
  2015-02-26  9:13 [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Krzysztof Kozlowski
@ 2015-02-26  9:13 ` Krzysztof Kozlowski
  2015-02-26 11:01   ` Lee Jones
  2015-02-26  9:13 ` [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message Krzysztof Kozlowski
  2015-02-26 10:47 ` [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Lee Jones
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-26  9:13 UTC (permalink / raw)
  To: Sangbeom Kim, Samuel Ortiz, Lee Jones, linux-kernel; +Cc: Krzysztof Kozlowski

The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
Power Loss) were removed from rtc-s5m driver because they were not used.
Remove them (and on/off interrupt) from main MFD driver and header.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---
Changes since v1:
1. Split out ENOMEM message removal to separate patch (suggested by
Lee).
---
 drivers/mfd/sec-core.c           | 1 -
 include/linux/mfd/samsung/core.h | 9 ---------
 2 files changed, 10 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 0a7bc43db4e4..423a2d3da4b2 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -333,7 +333,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
 	}
 	if (pdata) {
 		sec_pmic->device_type = pdata->device_type;
-		sec_pmic->ono = pdata->ono;
 		sec_pmic->irq_base = pdata->irq_base;
 		sec_pmic->wakeup = pdata->wakeup;
 		sec_pmic->pdata = pdata;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index 3fdb7cfbffb3..75115384f3fc 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -58,13 +58,7 @@ enum sec_device_type {
  * @irq_base:		Base IRQ number for device, required for IRQs
  * @irq:		Generic IRQ number for device
  * @irq_data:		Runtime data structure for IRQ controller
- * @ono:		Power onoff IRQ number for s5m87xx
  * @wakeup:		Whether or not this is a wakeup device
- * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
- *			Timer Software Reset (registers set to default value
- *			after PWRHOLD falling) and Sudden Momentary Power Loss
- *			(PMIC will enter power on sequence after short drop in
- *			VBATT voltage).
  */
 struct sec_pmic_dev {
 	struct device *dev;
@@ -77,9 +71,7 @@ struct sec_pmic_dev {
 	int irq;
 	struct regmap_irq_chip_data *irq_data;
 
-	int ono;
 	bool wakeup;
-	bool wtsr_smpl;
 };
 
 int sec_irq_init(struct sec_pmic_dev *sec_pmic);
@@ -95,7 +87,6 @@ struct sec_platform_data {
 	int				irq_base;
 	int				(*cfg_pmic_irq)(void);
 
-	int				ono;
 	bool				wakeup;
 	bool				buck_voltage_lock;
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message
  2015-02-26  9:13 [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Krzysztof Kozlowski
  2015-02-26  9:13 ` [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL Krzysztof Kozlowski
@ 2015-02-26  9:13 ` Krzysztof Kozlowski
  2015-02-26 11:01   ` Lee Jones
  2015-02-26 10:47 ` [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Lee Jones
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2015-02-26  9:13 UTC (permalink / raw)
  To: Sangbeom Kim, Samuel Ortiz, Lee Jones, linux-kernel; +Cc: Krzysztof Kozlowski

There is no need to print additional ENOMEM message for
sec_platform_data allocation failure.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---
Changes since v1:
1. New patch.
---
 drivers/mfd/sec-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 423a2d3da4b2..2253d44e631c 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
 	struct sec_platform_data *pd;
 
 	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
-	if (!pd) {
-		dev_err(dev, "could not allocate memory for pdata\n");
+	if (!pd)
 		return ERR_PTR(-ENOMEM);
-	}
 
 	/*
 	 * ToDo: the 'wakeup' member in the platform data is more of a linux
-- 
1.9.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss
  2015-02-26  9:13 [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Krzysztof Kozlowski
  2015-02-26  9:13 ` [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL Krzysztof Kozlowski
  2015-02-26  9:13 ` [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message Krzysztof Kozlowski
@ 2015-02-26 10:47 ` Lee Jones
  2 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2015-02-26 10:47 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Sangbeom Kim, Samuel Ortiz, linux-kernel

On Thu, 26 Feb 2015, Krzysztof Kozlowski wrote:

> The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> Power Loss) are never enabled. These are left-overs from board files.
> After removing them the driver's shutdown callback is empty so get rid
> of it as well.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> Changes since v1:
> 1. None. Patch applied by Andrew Morton. Resending for Lee Jones.
> ---
>  drivers/rtc/rtc-s5m.c | 60 ---------------------------------------------------
>  1 file changed, 60 deletions(-)

Due to dependencies with other patches I'll take this through MFD.

Applied, thanks.

> diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c
> index 89ac1d5083c6..4008b84246ca 100644
> --- a/drivers/rtc/rtc-s5m.c
> +++ b/drivers/rtc/rtc-s5m.c
> @@ -48,8 +48,6 @@ struct s5m_rtc_reg_config {
>  	unsigned int alarm0;
>  	/* First register for alarm 1, seconds */
>  	unsigned int alarm1;
> -	/* SMPL/WTSR register */
> -	unsigned int smpl_wtsr;
>  	/*
>  	 * Register for update flag (UDR). Typically setting UDR field to 1
>  	 * will enable update of time or alarm register. Then it will be
> @@ -67,7 +65,6 @@ static const struct s5m_rtc_reg_config s5m_rtc_regs = {
>  	.ctrl			= S5M_ALARM1_CONF,
>  	.alarm0			= S5M_ALARM0_SEC,
>  	.alarm1			= S5M_ALARM1_SEC,
> -	.smpl_wtsr		= S5M_WTSR_SMPL_CNTL,
>  	.rtc_udr_update		= S5M_RTC_UDR_CON,
>  	.rtc_udr_mask		= S5M_RTC_UDR_MASK,
>  };
> @@ -82,7 +79,6 @@ static const struct s5m_rtc_reg_config s2mps_rtc_regs = {
>  	.ctrl			= S2MPS_RTC_CTRL,
>  	.alarm0			= S2MPS_ALARM0_SEC,
>  	.alarm1			= S2MPS_ALARM1_SEC,
> -	.smpl_wtsr		= S2MPS_WTSR_SMPL_CNTL,
>  	.rtc_udr_update		= S2MPS_RTC_UDR_CON,
>  	.rtc_udr_mask		= S2MPS_RTC_WUDR_MASK,
>  };
> @@ -96,7 +92,6 @@ struct s5m_rtc_info {
>  	int irq;
>  	int device_type;
>  	int rtc_24hr_mode;
> -	bool wtsr_smpl;
>  	const struct s5m_rtc_reg_config	*regs;
>  };
>  
> @@ -597,28 +592,6 @@ static const struct rtc_class_ops s5m_rtc_ops = {
>  	.alarm_irq_enable = s5m_rtc_alarm_irq_enable,
>  };
>  
> -static void s5m_rtc_enable_wtsr(struct s5m_rtc_info *info, bool enable)
> -{
> -	int ret;
> -	ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
> -				 WTSR_ENABLE_MASK,
> -				 enable ? WTSR_ENABLE_MASK : 0);
> -	if (ret < 0)
> -		dev_err(info->dev, "%s: fail to update WTSR reg(%d)\n",
> -			__func__, ret);
> -}
> -
> -static void s5m_rtc_enable_smpl(struct s5m_rtc_info *info, bool enable)
> -{
> -	int ret;
> -	ret = regmap_update_bits(info->regmap, info->regs->smpl_wtsr,
> -				 SMPL_ENABLE_MASK,
> -				 enable ? SMPL_ENABLE_MASK : 0);
> -	if (ret < 0)
> -		dev_err(info->dev, "%s: fail to update SMPL reg(%d)\n",
> -			__func__, ret);
> -}
> -
>  static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info)
>  {
>  	u8 data[2];
> @@ -715,7 +688,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
>  	info->dev = &pdev->dev;
>  	info->s5m87xx = s5m87xx;
>  	info->device_type = s5m87xx->device_type;
> -	info->wtsr_smpl = s5m87xx->wtsr_smpl;
>  
>  	if (s5m87xx->irq_data) {
>  		info->irq = regmap_irq_get_virq(s5m87xx->irq_data, alarm_irq);
> @@ -731,11 +703,6 @@ static int s5m_rtc_probe(struct platform_device *pdev)
>  
>  	ret = s5m8767_rtc_init_reg(info);
>  
> -	if (info->wtsr_smpl) {
> -		s5m_rtc_enable_wtsr(info, true);
> -		s5m_rtc_enable_smpl(info, true);
> -	}
> -
>  	device_init_wakeup(&pdev->dev, 1);
>  
>  	info->rtc_dev = devm_rtc_device_register(&pdev->dev, "s5m-rtc",
> @@ -768,36 +735,10 @@ err:
>  	return ret;
>  }
>  
> -static void s5m_rtc_shutdown(struct platform_device *pdev)
> -{
> -	struct s5m_rtc_info *info = platform_get_drvdata(pdev);
> -	int i;
> -	unsigned int val = 0;
> -	if (info->wtsr_smpl) {
> -		for (i = 0; i < 3; i++) {
> -			s5m_rtc_enable_wtsr(info, false);
> -			regmap_read(info->regmap, info->regs->smpl_wtsr, &val);
> -			pr_debug("%s: WTSR_SMPL reg(0x%02x)\n", __func__, val);
> -			if (val & WTSR_ENABLE_MASK)
> -				pr_emerg("%s: fail to disable WTSR\n",
> -					 __func__);
> -			else {
> -				pr_info("%s: success to disable WTSR\n",
> -					__func__);
> -				break;
> -			}
> -		}
> -	}
> -	/* Disable SMPL when power off */
> -	s5m_rtc_enable_smpl(info, false);
> -}
> -
>  static int s5m_rtc_remove(struct platform_device *pdev)
>  {
>  	struct s5m_rtc_info *info = platform_get_drvdata(pdev);
>  
> -	/* Perform also all shutdown steps when removing */
> -	s5m_rtc_shutdown(pdev);
>  	i2c_unregister_device(info->i2c);
>  
>  	return 0;
> @@ -842,7 +783,6 @@ static struct platform_driver s5m_rtc_driver = {
>  	},
>  	.probe		= s5m_rtc_probe,
>  	.remove		= s5m_rtc_remove,
> -	.shutdown	= s5m_rtc_shutdown,
>  	.id_table	= s5m_rtc_id,
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL
  2015-02-26  9:13 ` [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL Krzysztof Kozlowski
@ 2015-02-26 11:01   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2015-02-26 11:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Sangbeom Kim, Samuel Ortiz, linux-kernel

On Thu, 26 Feb 2015, Krzysztof Kozlowski wrote:

> The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary
> Power Loss) were removed from rtc-s5m driver because they were not used.
> Remove them (and on/off interrupt) from main MFD driver and header.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> ---
> Changes since v1:
> 1. Split out ENOMEM message removal to separate patch (suggested by
> Lee).
> ---
>  drivers/mfd/sec-core.c           | 1 -
>  include/linux/mfd/samsung/core.h | 9 ---------
>  2 files changed, 10 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index 0a7bc43db4e4..423a2d3da4b2 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -333,7 +333,6 @@ static int sec_pmic_probe(struct i2c_client *i2c,
>  	}
>  	if (pdata) {
>  		sec_pmic->device_type = pdata->device_type;
> -		sec_pmic->ono = pdata->ono;
>  		sec_pmic->irq_base = pdata->irq_base;
>  		sec_pmic->wakeup = pdata->wakeup;
>  		sec_pmic->pdata = pdata;
> diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
> index 3fdb7cfbffb3..75115384f3fc 100644
> --- a/include/linux/mfd/samsung/core.h
> +++ b/include/linux/mfd/samsung/core.h
> @@ -58,13 +58,7 @@ enum sec_device_type {
>   * @irq_base:		Base IRQ number for device, required for IRQs
>   * @irq:		Generic IRQ number for device
>   * @irq_data:		Runtime data structure for IRQ controller
> - * @ono:		Power onoff IRQ number for s5m87xx
>   * @wakeup:		Whether or not this is a wakeup device
> - * @wtsr_smpl:		Whether or not to enable in RTC driver the Watchdog
> - *			Timer Software Reset (registers set to default value
> - *			after PWRHOLD falling) and Sudden Momentary Power Loss
> - *			(PMIC will enter power on sequence after short drop in
> - *			VBATT voltage).
>   */
>  struct sec_pmic_dev {
>  	struct device *dev;
> @@ -77,9 +71,7 @@ struct sec_pmic_dev {
>  	int irq;
>  	struct regmap_irq_chip_data *irq_data;
>  
> -	int ono;
>  	bool wakeup;
> -	bool wtsr_smpl;
>  };
>  
>  int sec_irq_init(struct sec_pmic_dev *sec_pmic);
> @@ -95,7 +87,6 @@ struct sec_platform_data {
>  	int				irq_base;
>  	int				(*cfg_pmic_irq)(void);
>  
> -	int				ono;
>  	bool				wakeup;
>  	bool				buck_voltage_lock;
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message
  2015-02-26  9:13 ` [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message Krzysztof Kozlowski
@ 2015-02-26 11:01   ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2015-02-26 11:01 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Sangbeom Kim, Samuel Ortiz, linux-kernel

On Thu, 26 Feb 2015, Krzysztof Kozlowski wrote:

> There is no need to print additional ENOMEM message for
> sec_platform_data allocation failure.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> ---
> Changes since v1:
> 1. New patch.
> ---
>  drivers/mfd/sec-core.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
> index 423a2d3da4b2..2253d44e631c 100644
> --- a/drivers/mfd/sec-core.c
> +++ b/drivers/mfd/sec-core.c
> @@ -267,10 +267,8 @@ static struct sec_platform_data *sec_pmic_i2c_parse_dt_pdata(
>  	struct sec_platform_data *pd;
>  
>  	pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> -	if (!pd) {
> -		dev_err(dev, "could not allocate memory for pdata\n");
> +	if (!pd)
>  		return ERR_PTR(-ENOMEM);
> -	}
>  
>  	/*
>  	 * ToDo: the 'wakeup' member in the platform data is more of a linux

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-26 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26  9:13 [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Krzysztof Kozlowski
2015-02-26  9:13 ` [PATCH v2 2/3] mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPL Krzysztof Kozlowski
2015-02-26 11:01   ` Lee Jones
2015-02-26  9:13 ` [PATCH v2 3/3] mfd: sec: Remove unnecessary out of memory message Krzysztof Kozlowski
2015-02-26 11:01   ` Lee Jones
2015-02-26 10:47 ` [PATCH v2 1/3] rtc: s5m: Remove unused watchdog and sudden momentary power loss Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).