Re: [PATCH] pwm: samsung: Simplify using devm_pwmchip_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2021 11:11, zhaoxiao wrote:
> Thanks for your advices, This patch is modified with reference to the 
> patch that has been submitted,example:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-testing&id=66a03c4fd9e95e192c574811a1f4ea8f62992358
> 

The patch there looks correct, but you cannot apply one code pattern to
entirely different code and hope it works.

You reference a patch in a driver not using drvdata and having only
pwmchip_remove() in its remove() callback.

Now you apply it to other drivers and:
1. Remove drvdata even though it is used,
2. Delete additional code from remove() callback.

Especially the point (2) is a proof that you don't understand the
fundamental Linux driver model, so please do not convert code into
devm-like() before learning it.


Best regards,
Krzysztof



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux