@@ -1254,7 +1254,7 @@ static struct fb_ops omapfb_ops = {
12541254static ssize_t omapfb_show_caps_num (struct device * dev ,
12551255 struct device_attribute * attr , char * buf )
12561256{
1257- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1257+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
12581258 int plane ;
12591259 size_t size ;
12601260 struct omapfb_caps caps ;
@@ -1274,7 +1274,7 @@ static ssize_t omapfb_show_caps_num(struct device *dev,
12741274static ssize_t omapfb_show_caps_text (struct device * dev ,
12751275 struct device_attribute * attr , char * buf )
12761276{
1277- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1277+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
12781278 int i ;
12791279 struct omapfb_caps caps ;
12801280 int plane ;
@@ -1321,7 +1321,7 @@ static DEVICE_ATTR(caps_text, 0444, omapfb_show_caps_text, NULL);
13211321static ssize_t omapfb_show_panel_name (struct device * dev ,
13221322 struct device_attribute * attr , char * buf )
13231323{
1324- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1324+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
13251325
13261326 return snprintf (buf , PAGE_SIZE , "%s\n" , fbdev -> panel -> name );
13271327}
@@ -1330,7 +1330,7 @@ static ssize_t omapfb_show_bklight_level(struct device *dev,
13301330 struct device_attribute * attr ,
13311331 char * buf )
13321332{
1333- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1333+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
13341334 int r ;
13351335
13361336 if (fbdev -> panel -> get_bklight_level ) {
@@ -1345,7 +1345,7 @@ static ssize_t omapfb_store_bklight_level(struct device *dev,
13451345 struct device_attribute * attr ,
13461346 const char * buf , size_t size )
13471347{
1348- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1348+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
13491349 int r ;
13501350
13511351 if (fbdev -> panel -> set_bklight_level ) {
@@ -1364,7 +1364,7 @@ static ssize_t omapfb_store_bklight_level(struct device *dev,
13641364static ssize_t omapfb_show_bklight_max (struct device * dev ,
13651365 struct device_attribute * attr , char * buf )
13661366{
1367- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1367+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
13681368 int r ;
13691369
13701370 if (fbdev -> panel -> get_bklight_level ) {
@@ -1397,7 +1397,7 @@ static struct attribute_group panel_attr_grp = {
13971397static ssize_t omapfb_show_ctrl_name (struct device * dev ,
13981398 struct device_attribute * attr , char * buf )
13991399{
1400- struct omapfb_device * fbdev = ( struct omapfb_device * ) dev -> driver_data ;
1400+ struct omapfb_device * fbdev = dev_get_drvdata ( dev ) ;
14011401
14021402 return snprintf (buf , PAGE_SIZE , "%s\n" , fbdev -> ctrl -> name );
14031403}
0 commit comments