Re: [PATCH v7.2 7/7] device property: Get rid of struct fwnode_handle type field

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

 



On Tue, Jun 20, 2017 at 11:49:56AM +0300, Sakari Ailus wrote:
> Instead of relying on the struct fwnode_handle type field, define
> fwnode_operations structs for all separate types of fwnodes. To find out
> the type, compare to the ops field to relevant ops structs.
> 
> This change has two benefits:
> 
> 1. it avoids adding the type field to each and every instance of struct
> fwnode_handle, thus saving memory and
> 
> 2. makes the ops field the single factor that defines both the types of
> the fwnode as well as defines the implementation of its operations,
> decreasing the possibility of bugs when developing code dealing with
> fwnode internals.
> 
> Suggested-by: Rob Herring <robh@xxxxxxxxxx>
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux