Skip to content
  • Vaibhav Gupta's avatar
    software: kernel: i2c: Use 'idr' instead of 'pdev' · 40ce1c04
    Vaibhav Gupta authored
    
    
    The si570 i2c handler is used only to configure the clock at an early
    stage, and never after. Thus, we don't require to save platform related
    data of the i2c handler, and only the 'idr' should be enough.
    
    Also because we can't do much with 'struct platform_device' data, but
    with 'idr', we can obtain adapter and do data transfer via i2c APIs.
    
    We can always retrieve the 'struct platform_device' data related to this
    i2c_handler from its 'idr' if needed, for example in *exit().
    
    Signed-off-by: default avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
    40ce1c04