From fe967a0403a2fa82dfa2af3c40a8fc181241947a Mon Sep 17 00:00:00 2001
From: Pablo Barciela <scow@riseup.net>
Date: Mon, 19 Aug 2019 14:42:17 +0200
Subject: msd-smartcard: avoid 'g_type_class_add_private'

---
 plugins/smartcard/msd-smartcard.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/plugins/smartcard/msd-smartcard.c b/plugins/smartcard/msd-smartcard.c
index bfc0334..9316cfd 100644
--- a/plugins/smartcard/msd-smartcard.c
+++ b/plugins/smartcard/msd-smartcard.c
@@ -97,7 +97,7 @@ enum {
 
 static guint msd_smartcard_signals[NUMBER_OF_SIGNALS] = { 0 };
 
-G_DEFINE_TYPE (MsdSmartcard, msd_smartcard, G_TYPE_OBJECT);
+G_DEFINE_TYPE_WITH_PRIVATE (MsdSmartcard, msd_smartcard, G_TYPE_OBJECT);
 
 static void
 msd_smartcard_class_init (MsdSmartcardClass *card_class)
@@ -110,9 +110,6 @@ msd_smartcard_class_init (MsdSmartcardClass *card_class)
 
         msd_smartcard_class_install_signals (card_class);
         msd_smartcard_class_install_properties (card_class);
-
-        g_type_class_add_private (card_class,
-                                  sizeof (MsdSmartcardPrivate));
 }
 
 static void
@@ -393,9 +390,7 @@ msd_smartcard_init (MsdSmartcard *card)
 
         g_debug ("initializing smartcard ");
 
-        card->priv = G_TYPE_INSTANCE_GET_PRIVATE (card,
-                                                  MSD_TYPE_SMARTCARD,
-                                                  MsdSmartcardPrivate);
+        card->priv = msd_smartcard_get_instance_private (card);
 
         if (card->priv->slot != NULL) {
                 card->priv->name = g_strdup (PK11_GetTokenName (card->priv->slot));
-- 
cgit v1.2.1