Hi, I am Dr. Peter and would like to help.
1- Is he itchy?
2- How long has this been going on?
3- How often do you bath and what do you use?
4- How often do you clean his ears?
5- Has he been treated for flaky skin?
The flaky skin could be either he needs to increase fatty acids in his diet or he has a skin infection. For fatty acids you could supplement in the form of cod liver oil 1 teaspoon for every 50 pounds body weight. But, it is a good idea to have the vet look at the skin and make certain this is not an infection.
Regarding the ears, if they are infected at this point he needs topical medication to treat them daily. Then clean the ears with ear cleaning solution 2-3 times a week.
When dogs have reoccuring ear infections this could be either the infection was never cleared because it was not treated long enough (10-14 days). Or, it could be a sign of an underlying allergy like food allergies. If he continues to have ear infections, I will recommend you speak to your vet about doing a culture and sensitivity; this test will tell what are the bacterias causing the problems and best medication to use. Once this is treated in this manner and if he continues to have ear infections, then consider changing his diet to a hypoallergenic diet like hill's z/d, this could be related to allergies.
If you have additional questions I will be glad to answer them.