Skip to content
  • Thomas Haller's avatar
    device: replace NM_DEVICE_CLASS_DECLARE_TYPES() macro by explicit initialization · 2ce41679
    Thomas Haller authored
    It seems to me the NM_DEVICE_CLASS_DECLARE_TYPES() macro confuses more
    than helping. Let's explicitly initialize the two fields, albeit with
    another helper macro NM_DEVICE_DEFINE_LINK_TYPES() to get the list of
    link-types right.
    
    For consistency, also leave nop-lines like
    
      device_class->connection_type_supported = NULL;
      device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES ();
    
    because all NMDevice class init methods should have this same
    boiler plate code and to make it explicit that this is intended.
    And there are only 3 occurences where this actually comes into play.
    2ce41679