platform/x86/intel/ifs: Reorganize driver data
authorJithu Joseph <jithu.joseph@intel.com>
Wed, 22 Mar 2023 00:33:52 +0000 (17:33 -0700)
committerHans de Goede <hdegoede@redhat.com>
Mon, 27 Mar 2023 14:10:20 +0000 (16:10 +0200)
commit54c9fcd187dd3bbc151cff9e5be01dda4f23dd0d
tree723a17185c1cd9dde3f48221364ca56154e00eda
parent67f88ffa6d35d6b4e776f98ea64aab0bc026e2a2
platform/x86/intel/ifs: Reorganize driver data

The struct holding device driver data contained both read only(ro)
and read write(rw) fields.

Separating ro fields from rw fields was recommended as
a preferable design pattern during review[1].

Group ro fields into a separate const struct. Associate it to
the miscdevice being registered by keeping its pointer in the
same container struct as the miscdevice.

Link: https://lore.kernel.org/lkml/Y+9H9otxLYPqMkUh@kroah.com/
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20230322003359.213046-3-jithu.joseph@intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/intel/ifs/core.c
drivers/platform/x86/intel/ifs/ifs.h
drivers/platform/x86/intel/ifs/load.c