@@ -86,18 +86,14 @@ struct ht16k33_fbdev {
8686 uint8_t * cache ;
8787};
8888
89- struct ht16k33_seg {
90- struct linedisp linedisp ;
91- };
92-
9389struct ht16k33_priv {
9490 struct i2c_client * client ;
9591 struct delayed_work work ;
9692 struct led_classdev led ;
9793 struct ht16k33_keypad keypad ;
9894 union {
9995 struct ht16k33_fbdev fbdev ;
100- struct ht16k33_seg seg ;
96+ struct linedisp linedisp ;
10197 };
10298 enum display_type type ;
10399 uint8_t blink ;
@@ -110,7 +106,7 @@ struct ht16k33_priv {
110106 container_of(p, struct ht16k33_priv, led)
111107
112108#define ht16k33_linedisp_to_priv (p ) \
113- container_of(p, struct ht16k33_priv, seg. linedisp)
109+ container_of(p, struct ht16k33_priv, linedisp)
114110
115111static const struct fb_fix_screeninfo ht16k33_fb_fix = {
116112 .id = DRIVER_NAME ,
@@ -417,9 +413,8 @@ static void ht16k33_keypad_stop(struct input_dev *dev)
417413static void ht16k33_seg7_update (struct work_struct * work )
418414{
419415 struct ht16k33_priv * priv = ht16k33_work_to_priv (work );
420- struct ht16k33_seg * seg = & priv -> seg ;
421- struct linedisp_map * map = seg -> linedisp .map ;
422- char * s = seg -> linedisp .buf ;
416+ struct linedisp_map * map = priv -> linedisp .map ;
417+ char * s = priv -> linedisp .buf ;
423418 uint8_t buf [9 ];
424419
425420 buf [0 ] = map_to_seg7 (& map -> map .seg7 , * s ++ );
@@ -438,9 +433,8 @@ static void ht16k33_seg7_update(struct work_struct *work)
438433static void ht16k33_seg14_update (struct work_struct * work )
439434{
440435 struct ht16k33_priv * priv = ht16k33_work_to_priv (work );
441- struct ht16k33_seg * seg = & priv -> seg ;
442- struct linedisp_map * map = seg -> linedisp .map ;
443- char * s = seg -> linedisp .buf ;
436+ struct linedisp_map * map = priv -> linedisp .map ;
437+ char * s = priv -> linedisp .buf ;
444438 uint8_t buf [8 ];
445439
446440 put_unaligned_le16 (map_to_seg14 (& map -> map .seg14 , * s ++ ), buf + 0 );
@@ -662,14 +656,14 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
662656static int ht16k33_seg_probe (struct device * dev , struct ht16k33_priv * priv ,
663657 uint32_t brightness )
664658{
665- struct ht16k33_seg * seg = & priv -> seg ;
659+ struct linedisp * linedisp = & priv -> linedisp ;
666660 int err ;
667661
668662 err = ht16k33_brightness_set (priv , brightness );
669663 if (err )
670664 return err ;
671665
672- return linedisp_register (& seg -> linedisp , dev , 4 , & ht16k33_linedisp_ops );
666+ return linedisp_register (linedisp , dev , 4 , & ht16k33_linedisp_ops );
673667}
674668
675669static int ht16k33_probe (struct i2c_client * client )
@@ -756,7 +750,7 @@ static void ht16k33_remove(struct i2c_client *client)
756750
757751 case DISP_QUAD_7SEG :
758752 case DISP_QUAD_14SEG :
759- linedisp_unregister (& priv -> seg . linedisp );
753+ linedisp_unregister (& priv -> linedisp );
760754 break ;
761755
762756 default :
0 commit comments